|
|
@@ -4,9 +4,6 @@ import com.seecoder.BlueWhale.Service.UserService;
|
|
|
import com.seecoder.BlueWhale.VO.ResultVO;
|
|
|
import com.seecoder.BlueWhale.VO.UserVO;
|
|
|
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.Map;
|
|
|
-
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
@@ -27,9 +24,7 @@ public class UserController {
|
|
|
}
|
|
|
|
|
|
@PostMapping("/login")
|
|
|
- public ResultVO<Map<String, String>> login(@RequestParam("phone") String phone, @RequestParam("password") String password){
|
|
|
- Map<String, String> tokenMap = new HashMap<>();
|
|
|
- tokenMap.put("token", userService.login(phone, password));
|
|
|
- return ResultVO.buildSuccess(tokenMap);
|
|
|
+ public ResultVO<String> login(@RequestParam("phone") String phone, @RequestParam("password") String password){
|
|
|
+ return ResultVO.buildSuccess(userService.login(phone, password));
|
|
|
}
|
|
|
}
|