fix: change backend hadlers, API route and uploads photo

This commit is contained in:
2026-06-24 20:47:14 +03:00
parent 2c22cee60b
commit 115f52a8f1
5 changed files with 189 additions and 10 deletions
+2 -1
View File
@@ -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)
}
}