mirror of
https://github.com/FatttSnake/Pinnacle-OA.git
synced 2026-04-05 15:01:23 +08:00
Fixed jwt verify. Blocked access to the password for the user controller.
This commit is contained in:
@@ -6,6 +6,7 @@ import com.cfive.pinnacle.entity.common.ResponseResult;
|
||||
import com.cfive.pinnacle.service.IUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@@ -31,7 +32,13 @@ public class UserController {
|
||||
|
||||
@GetMapping
|
||||
public ResponseResult getAllUser() {
|
||||
List<User> users = userService.list();
|
||||
List<User> users = userService.getBasicInfo();
|
||||
return ResponseResult.build(ResponseCode.DATABASE_SELECT_OK, "success", users);
|
||||
}
|
||||
|
||||
@GetMapping("/{id}")
|
||||
public ResponseResult getUser(@PathVariable int id) {
|
||||
User user = userService.getBasicInfo(id);
|
||||
return ResponseResult.build(ResponseCode.DATABASE_SELECT_OK, "success", user);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user