修改几个接口的token获取方式
This commit is contained in:
parent
f6d6223bcd
commit
c8f8633e1c
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue