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:
2026-02-24 14:52:45 +09:00
parent ec6ac35ac7
commit 17983ad775
4 changed files with 66 additions and 0 deletions

View File

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