dev add complaint all info with pagination
Test Workflow / test (push) Has been cancelled

This commit is contained in:
2026-05-27 11:31:04 +07:00
parent 357ca3ec62
commit ea763edbec
@@ -3,6 +3,7 @@ package ru.soune.nocopy.handler;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import ru.soune.nocopy.dto.BaseRequest; import ru.soune.nocopy.dto.BaseRequest;
@@ -30,6 +31,9 @@ public class FileInteranlInfoHandler implements RequestHandler {
private final ModerationService moderationService; private final ModerationService moderationService;
@Value("${server.baseurl}")
private String baseUrl;
@Override @Override
public BaseResponse handle(BaseRequest request) throws Exception { public BaseResponse handle(BaseRequest request) throws Exception {
try { try {
@@ -78,6 +82,9 @@ public class FileInteranlInfoHandler implements RequestHandler {
Map<String, Object> fileMap = new HashMap<>(); Map<String, Object> fileMap = new HashMap<>();
fileMap.put("fileId", file.getId()); fileMap.put("fileId", file.getId());
fileMap.put("fileName", file.getOriginalFileName()); fileMap.put("fileName", file.getOriginalFileName());
fileMap.put("downloadUrl", "/api/v" + 1 + "/files/download/" + file.getId());
fileMap.put("image", baseUrl + "/api/files/protected/" + file.getId() + "/thumbnail");
fileMap.put("userId", file.getUserId()); fileMap.put("userId", file.getUserId());
fileMap.put("status", file.getStatus() != null ? file.getStatus().name() : null); fileMap.put("status", file.getStatus() != null ? file.getStatus().name() : null);