mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-06 07:54:22 +00:00
Implement update and delete account handlers
This commit is contained in:
@@ -33,6 +33,10 @@ func SetupRoutes(r chi.Router, db *db.DB, fs *filesystem.FileSystem, authMiddlew
|
||||
r.Post("/auth/logout", handler.Logout(sessionService))
|
||||
r.Get("/auth/me", handler.GetCurrentUser())
|
||||
|
||||
// User profile routes
|
||||
r.Put("/profile", handler.UpdateProfile())
|
||||
r.Delete("/profile", handler.DeleteAccount())
|
||||
|
||||
// Admin-only routes
|
||||
r.Group(func(r chi.Router) {
|
||||
r.Use(authMiddleware.RequireRole("admin"))
|
||||
|
||||
Reference in New Issue
Block a user