1
0
mirror of https://github.com/FatttSnake/Pinnacle-OA.git synced 2026-04-05 06:51:23 +08:00

Fixed jwt verify. Blocked access to the password for the user controller.

This commit is contained in:
2023-05-05 01:12:44 +08:00
parent 4fc3655e63
commit 7695a20e77
5 changed files with 108 additions and 17 deletions

View File

@@ -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);
}
}