feat:1.优化commonResult 2. 重新初始化数据库结构
This commit is contained in:
@@ -26,7 +26,7 @@ public class LoginController {
|
||||
|
||||
@Operation(summary = "登录API")
|
||||
@PostMapping("/login")
|
||||
public CommonResult<Object> login(@RequestBody LoginBody loginBody) throws AppException {
|
||||
public CommonResult<String> login(@RequestBody LoginBody loginBody) throws AppException {
|
||||
String userId = userServiceImpl.authenticate(loginBody.getUsername(), loginBody.getPassword());
|
||||
String token = loginService.login(userId);
|
||||
//todo 参数传递未加密
|
||||
@@ -35,7 +35,7 @@ public class LoginController {
|
||||
|
||||
@Operation(summary = "退出登录API-功能未完成")
|
||||
@PostMapping("/loingOut")
|
||||
public CommonResult loingOut(@RequestBody LoginBody loginBody) throws AppException {
|
||||
public CommonResult<Void> loingOut(@RequestBody LoginBody loginBody) throws AppException {
|
||||
//todo loginOut 退出登录API
|
||||
// loginService.loginOut();
|
||||
return CommonResult.success("已登出");
|
||||
|
||||
Reference in New Issue
Block a user