Created edit for users

This commit is contained in:
tdv
2025-12-04 16:07:51 +02:00
parent 50850897c0
commit 1284c1c4c1
5 changed files with 178 additions and 16 deletions

View File

@@ -50,7 +50,7 @@ func Build(db *gorm.DB, minio *minio.Client, cfg *config.Config) *gin.Engine {
r.POST("/auth/change_password", authMW, authH.ChangePassword)
r.GET("/users/profile", authMW, usersH.Profile)
r.POST("/users/:id/set_role", authMW, adminOnly, usersH.SetRole)
r.PUT("/users/:id", authMW, adminOnly, usersH.Update)
r.GET("/users", authMW, adminOnly, usersH.List)
r.POST("/users/create", authMW, adminOnly, usersH.Create)
r.DELETE("/users/:id", authMW, adminOnly, usersH.Delete)