This commit is contained in:
@@ -59,12 +59,15 @@ public class ImageFoundRequestHandler implements RequestHandler {
|
||||
// GoogleVisionSearchResponse googleVisionSearchResponse = googleVisionSearchService.searchByFileEntity(fileId);
|
||||
|
||||
String yandexReverseSearchResponse = yandexSearchService.searchReverseByPublicUrl(fileEntity);
|
||||
int page = imageSearchRequest.getPage() != null ? imageSearchRequest.getPage() : 1;
|
||||
int pageSize = imageSearchRequest.getPageSize() != null ? imageSearchRequest.getPageSize() : 10;
|
||||
|
||||
tariffInfoService.writeOffTokens(fileEntity.getUserId(), TariffConstants.TOKEN_VALUE_FOR_SEARCH);
|
||||
|
||||
checkCounterService.incrementCheckCount(fileEntity.getUserId(), fileEntity.getMimeType());
|
||||
|
||||
return new BaseResponse(request.getMsgId(), MessageCode.SUCCESS.getCode(),
|
||||
MessageCode.SUCCESS.getDescription(),mapper.mapToYandexResponse(yandexReverseSearchResponse));
|
||||
MessageCode.SUCCESS.getDescription(),mapper.mapToYandexResponse(yandexReverseSearchResponse, page,
|
||||
pageSize));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user