mirror of
https://github.com/hazemKrimi/crimson-vault.git
synced 2026-05-01 18:20:27 +00:00
chore: add user schema
This commit is contained in:
+18
-6
@@ -1,11 +1,23 @@
|
||||
package api
|
||||
|
||||
import "github.com/labstack/echo/v4/middleware"
|
||||
|
||||
func (api *API) ClientRoutes() {
|
||||
group := api.instance.Group("/clients")
|
||||
clients := api.instance.Group("/clients")
|
||||
users := api.instance.Group("/users")
|
||||
|
||||
group.GET("/", api.GetAllClientsHandler)
|
||||
group.POST("/", api.CreateClientHandler)
|
||||
group.GET("/:id", api.GetClientHandler)
|
||||
group.PUT("/:id", api.UpdateClientHandler)
|
||||
group.DELETE("/:id", api.DeleteClientHandler)
|
||||
clients.GET("/", api.GetAllClientsHandler)
|
||||
clients.POST("/", api.CreateClientHandler)
|
||||
clients.GET("/:id", api.GetClientHandler)
|
||||
clients.PUT("/:id", api.UpdateClientHandler)
|
||||
clients.DELETE("/:id", api.DeleteClientHandler)
|
||||
|
||||
users.GET("/", api.GetAllUsersHandler)
|
||||
users.POST("/", api.CreateUserHandler)
|
||||
users.GET("/:id", api.GetUserHandler)
|
||||
users.PUT("/:id", api.UpdateUserHandler)
|
||||
users.PUT("/:id/security", api.UpdateUserSecurityDetailsHandler)
|
||||
users.PUT("/:id/logo", api.UpdateUserLogoHandler, middleware.BodyLimit("2M"))
|
||||
users.DELETE("/:id", api.DeleteUserHandler)
|
||||
users.DELETE("/:id/logo", api.DeleteUserLogoHandler)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user