feat: 유저 관리 API 추가 (목록 조회, 권한 변경, 삭제)
- GET /api/users - 전체 유저 목록 (admin only) - PATCH /api/users/:id/role - 권한 변경 (admin only) - DELETE /api/users/:id - 유저 삭제 (admin only) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -21,6 +21,12 @@ func Register(
|
||||
a.Post("/login", authH.Login)
|
||||
a.Post("/logout", middleware.Auth, authH.Logout)
|
||||
|
||||
// Users (admin only)
|
||||
u := api.Group("/users", middleware.Auth, middleware.AdminOnly)
|
||||
u.Get("/", authH.GetAllUsers)
|
||||
u.Patch("/:id/role", authH.UpdateRole)
|
||||
u.Delete("/:id", authH.DeleteUser)
|
||||
|
||||
// Announcements
|
||||
ann := api.Group("/announcements")
|
||||
ann.Get("/", annH.GetAll)
|
||||
|
||||
Reference in New Issue
Block a user