delete regisrty
Удалена регистрация пользователем, осталась только логин через форму, причесал api на бекенде
This commit is contained in:
+15
-12
@@ -33,20 +33,23 @@ func main() {
|
||||
c.Next()
|
||||
})
|
||||
|
||||
r.POST("/register", handlers.Register)
|
||||
r.POST("/login", handlers.Login)
|
||||
|
||||
protected := r.Group("/api")
|
||||
protected.Use(middleware.AuthRequired())
|
||||
api := r.Group("/api")
|
||||
{
|
||||
protected.GET("/parts/:id", handlers.GetPart)
|
||||
protected.GET("/parts", handlers.GetAllParts)
|
||||
protected.GET("/orders", handlers.GetsOrders)
|
||||
protected.POST("/parts", handlers.CreatePart)
|
||||
protected.POST("/parts/bulk", handlers.ImportParts)
|
||||
protected.PATCH("/parts/:id/status", handlers.UpdateStatus)
|
||||
protected.DELETE("/parts/:id", handlers.DeletePart)
|
||||
api.POST("/register", handlers.Register)
|
||||
api.POST("/login", handlers.Login)
|
||||
|
||||
protected := api.Group("/")
|
||||
protected.Use(middleware.AuthRequired())
|
||||
{
|
||||
protected.GET("/parts/:id", handlers.GetPart)
|
||||
protected.GET("/parts", handlers.GetAllParts)
|
||||
protected.GET("/orders", handlers.GetsOrders)
|
||||
protected.POST("/parts", handlers.CreatePart)
|
||||
protected.POST("/parts/bulk", handlers.ImportParts)
|
||||
protected.PATCH("/parts/:id/status", handlers.UpdateStatus)
|
||||
protected.DELETE("/parts/:id", handlers.DeletePart)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
r.Run(":8090")
|
||||
|
||||
Reference in New Issue
Block a user