From dff5b7eddd33d5e9b3c62579ea166075c5fbe2ae Mon Sep 17 00:00:00 2001 From: Gary Date: Mon, 29 Jan 2024 17:55:41 +0800 Subject: [PATCH] 1.update some Authorization to requried for better swagger desc --- .../java/com/luoo/music/controller/JournalController.java | 2 +- .../main/java/com/luoo/music/controller/SongController.java | 2 +- .../main/java/com/luoo/user/controller/LoginController.java | 2 +- .../java/com/luoo/user/controller/UserCollectController.java | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/luoo_music/src/main/java/com/luoo/music/controller/JournalController.java b/luoo_music/src/main/java/com/luoo/music/controller/JournalController.java index b340c85..854a98f 100644 --- a/luoo_music/src/main/java/com/luoo/music/controller/JournalController.java +++ b/luoo_music/src/main/java/com/luoo/music/controller/JournalController.java @@ -120,7 +120,7 @@ public class JournalController { @GetMapping("/collect/{userId}/{pageNum}/{pageSize}") @GlobalInterceptor(checkAppUserLogin = true) public Result> collectPage( - @RequestHeader(value = "Authorization", required = false) String authorization, + @RequestHeader(value = "Authorization", required = true) String authorization, @PathVariable @VerifyParam(required = true)String userId, @PathVariable @VerifyParam(required = true)Integer pageNum, @PathVariable @VerifyParam(required = true)Integer pageSize) { diff --git a/luoo_music/src/main/java/com/luoo/music/controller/SongController.java b/luoo_music/src/main/java/com/luoo/music/controller/SongController.java index 1135081..ae8515d 100644 --- a/luoo_music/src/main/java/com/luoo/music/controller/SongController.java +++ b/luoo_music/src/main/java/com/luoo/music/controller/SongController.java @@ -80,7 +80,7 @@ public class SongController { @GetMapping("/collect/{userId}/{pageNum}/{pageSize}") @GlobalInterceptor(checkAppUserLogin = true) public Result> collectPage( - @RequestHeader(value = "Authorization", required = false) String authorization, + @RequestHeader(value = "Authorization", required = true) String authorization, @PathVariable @VerifyParam(required = true) String userId, @PathVariable @VerifyParam(required = true) Integer pageNum, @PathVariable @VerifyParam(required = true) Integer pageSize) { diff --git a/luoo_user/src/main/java/com/luoo/user/controller/LoginController.java b/luoo_user/src/main/java/com/luoo/user/controller/LoginController.java index 5dc60fc..4ad2a20 100644 --- a/luoo_user/src/main/java/com/luoo/user/controller/LoginController.java +++ b/luoo_user/src/main/java/com/luoo/user/controller/LoginController.java @@ -206,7 +206,7 @@ public class LoginController extends BaseController { @ApiOperation(value = "6.退出登录") @PostMapping("/logout") @GlobalInterceptor(checkAppUserLogin = true) - public Result logout(@RequestHeader(value = "Authorization", required = false) String authorization){ + public Result logout(@RequestHeader(value = "Authorization", required = true) String authorization){ return Result.success(); } } diff --git a/luoo_user/src/main/java/com/luoo/user/controller/UserCollectController.java b/luoo_user/src/main/java/com/luoo/user/controller/UserCollectController.java index 0a5347b..9e1348c 100644 --- a/luoo_user/src/main/java/com/luoo/user/controller/UserCollectController.java +++ b/luoo_user/src/main/java/com/luoo/user/controller/UserCollectController.java @@ -31,7 +31,7 @@ public class UserCollectController { @ApiImplicitParam(name = "collectType", value = "0:歌曲,1:期刊,2:关注,3:黑名单", required = true) }) @PostMapping @GlobalInterceptor(checkAppUserLogin = true) - public Result addCollect(@RequestHeader(value = "Authorization", required = false) String authorization, + public Result addCollect(@RequestHeader(value = "Authorization", required = true) String authorization, @VerifyParam(required = true) @RequestParam("objectId") String objectId, @VerifyParam(required = true) @RequestParam("collectType") Integer collectType) { UserLoginDto loginDto = jwtUtil.getUserLoginDto(authorization); @@ -48,7 +48,7 @@ public class UserCollectController { @ApiImplicitParam(name = "collectType", value = "0:歌曲,1:期刊,2:关注,3:黑名单,4:粉丝", required = true) }) @DeleteMapping @GlobalInterceptor(checkAppUserLogin = true) - public Result cancelCollect(@RequestHeader(value = "Authorization", required = false) String authorization, + public Result cancelCollect(@RequestHeader(value = "Authorization", required = true) String authorization, @VerifyParam(required = true) @RequestParam("objectId") String objectId, @VerifyParam(required = true) @RequestParam("collectType") Integer collectType) { UserLoginDto loginDto = jwtUtil.getUserLoginDto(authorization);