fix(backend,frontend) remake update profile
This commit is contained in:
+6
-2
@@ -35,9 +35,7 @@ func main() {
|
||||
|
||||
api := r.Group("/api")
|
||||
{
|
||||
api.POST("/register", handlers.Register)
|
||||
api.POST("/login", handlers.Login)
|
||||
|
||||
protected := api.Group("/")
|
||||
protected.Use(middleware.AuthRequired())
|
||||
{
|
||||
@@ -47,8 +45,14 @@ func main() {
|
||||
protected.POST("/parts", handlers.CreatePart)
|
||||
protected.POST("/parts/bulk", handlers.ImportParts)
|
||||
protected.PATCH("/parts/:id/status", handlers.UpdateStatus)
|
||||
protected.PATCH("/user/update", handlers.UpdateProfile)
|
||||
protected.DELETE("/parts/:id", handlers.DeletePart)
|
||||
}
|
||||
|
||||
admin := protected.Group("/")
|
||||
admin.Use(middleware.AdminOnly())
|
||||
{
|
||||
admin.POST("/register", handlers.Register)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user