fix: change backend hadlers, API route and uploads photo
This commit is contained in:
+2
-1
@@ -41,7 +41,7 @@ func main() {
|
||||
api.POST("/login", handlers.Login)
|
||||
protected := api.Group("/")
|
||||
api.GET("/items/:id", handlers.GetItem)
|
||||
api.GET("/items/", handlers.GetAllItems)
|
||||
api.GET("/items", handlers.GetAllItems)
|
||||
api.GET("/getCategories", handlers.GetCategories)
|
||||
api.POST("/register", handlers.Register)
|
||||
protected.Use(middleware.AuthRequired())
|
||||
@@ -66,6 +66,7 @@ func main() {
|
||||
admin.POST("/register", handlers.RegisterAdmin)
|
||||
admin.GET("/orders", handlers.GetAllOrders)
|
||||
admin.PATCH("/orders/:id", handlers.UpdateOrderStatus)
|
||||
admin.PATCH("/items/:id/avatar", handlers.UploadItemAvatar)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user