fix
This commit is contained in:
parent
deab62880d
commit
618652784e
@ -8,6 +8,7 @@ import com.knowledge.base.application.service.DocAppService;
|
||||
import com.knowledge.base.application.service.UserAppService;
|
||||
import com.knowledge.base.domain.common.model.PageResult;
|
||||
import com.knowledge.base.infrastructure.cache.FileCacheService;
|
||||
import com.knowledge.base.infrastructure.config.ConstantConfig;
|
||||
import com.knowledge.base.infrastructure.north.dto.SearchReq;
|
||||
import com.knowledge.base.infrastructure.north.dto.doc.OSRecordDTO;
|
||||
import com.knowledge.base.infrastructure.north.dto.user.UserDTO;
|
||||
@ -102,10 +103,12 @@ public class FileQueryController {
|
||||
|
||||
@GetMapping("/fetch-os-upload-history")
|
||||
public ResponseEntity<?> listUploadedFiles(
|
||||
@CookieValue(value = ConstantConfig.COOKIE_KEY, required = false) String cookieToken,
|
||||
@RequestHeader("Authorization") String token,
|
||||
@RequestParam(defaultValue = "1") int page,
|
||||
@RequestParam(defaultValue = "10") int size
|
||||
) {
|
||||
token = StrUtil.isBlank(token) ? cookieToken : token;
|
||||
Optional<UserTokenDTO> userTokenDTO = userAppService.findToken(token);
|
||||
if (userTokenDTO.isEmpty()) {
|
||||
return ResponseEntity.status(401).body("未登录或token无效");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user