dev add code respone for download files
Test Workflow / test (push) Successful in 4s

This commit is contained in:
vladp
2026-02-16 10:43:20 +07:00
parent f15a24acc2
commit 7a02b94bd0
2 changed files with 6 additions and 6 deletions
@@ -300,12 +300,10 @@ public class ApiController {
if (tokenHeader == null) {
Map<String, Object> errorData = new HashMap<>();
errorData.put("token", tokenHeader);
errorData.put("fileId", fileId);
errorData.put("version", version);
return ResponseEntity.ok().body(new BaseResponse(20004,
MessageCode.FILE_DOWNLOAD_ERROR_NOT_CORRECT_FIELD.getCode(),
MessageCode.FILE_DOWNLOAD_ERROR_NOT_CORRECT_FIELD.getDescription(),
MessageCode.TOKEN_IS_NULL.getCode(),
MessageCode.TOKEN_IS_NULL.getDescription(),
errorData));
}
@@ -317,8 +315,8 @@ public class ApiController {
errorData.put("token", tokenHeader);
return ResponseEntity.ok().body(new BaseResponse(20004,
MessageCode.FILE_DOWNLOAD_ERROR.getCode(),
MessageCode.FILE_DOWNLOAD_ERROR.getDescription(),
MessageCode.USER_NOT_HAD_PERMISSION.getCode(),
MessageCode.USER_NOT_HAD_PERMISSION.getDescription(),
errorData));
}