修改几个接口的token获取方式

This commit is contained in:
石皮幼鸟 2024-04-10 18:44:02 +08:00
parent f6d6223bcd
commit c8f8633e1c
1 changed files with 4 additions and 4 deletions

View File

@ -34,14 +34,14 @@ public class AuthController {
}
@ApiOperation(value = "用户注销")
@PostMapping("/logout")
public R logout(String token) {
@GetMapping("/logout")
public R logout(@RequestHeader("token") String token) {
return authService.logout(token) ? R.ok() : R.fail();
}
@ApiOperation(value = "验证token不会返回密码")
@PostMapping("/verify")
public R<User> verify(String token) {
@GetMapping("/verify")
public R<User> verify(@RequestHeader("token") String token) {
return R.ok(authService.verify(token));
}