修改几个接口的token获取方式
This commit is contained in:
parent
f6d6223bcd
commit
c8f8633e1c
|
@ -34,14 +34,14 @@ public class AuthController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "用户注销")
|
@ApiOperation(value = "用户注销")
|
||||||
@PostMapping("/logout")
|
@GetMapping("/logout")
|
||||||
public R logout(String token) {
|
public R logout(@RequestHeader("token") String token) {
|
||||||
return authService.logout(token) ? R.ok() : R.fail();
|
return authService.logout(token) ? R.ok() : R.fail();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "验证token(不会返回密码)")
|
@ApiOperation(value = "验证token(不会返回密码)")
|
||||||
@PostMapping("/verify")
|
@GetMapping("/verify")
|
||||||
public R<User> verify(String token) {
|
public R<User> verify(@RequestHeader("token") String token) {
|
||||||
return R.ok(authService.verify(token));
|
return R.ok(authService.verify(token));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue