Files
StoreWeb/Plugins/CloudProduct/Controllers/ProductInspectionController.cs
T
2026-11-06 19:25:36 +08:00

20 lines
843 B
C#

using MAX.Framework.Conventions;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Store.Framework.Base;
using Store.Modules.CloudProduct.Dtos;
using Store.Modules.CloudProduct.Services;
namespace Store.Modules.CloudProduct.Controllers;
/// <summary>上传图片识别及当前用户的商品安全记录。</summary>
[Tags("商品检测"), DefaultHttpPost]
[Route("api/CloudGoods/[action]")]
public sealed class ProductInspectionController(ProductInspectionService service) : AppControllerBase
{
[EndpointSummary("识别上传图片中的文字和品牌 Logo")]
[RequestFormLimits(ValueLengthLimit = ProductInspectionService.MaxBase64Length)]
public Task<string[]> InspectImage(InspectImageRequest request, CancellationToken cancellationToken)
=> service.InspectAsync(request, cancellationToken);
}