Skip to content

Commit

Permalink
feat : added routes to all for chaintype
Browse files Browse the repository at this point in the history
  • Loading branch information
surajhub255 committed Jul 17, 2024
1 parent df9d5f3 commit c2b8704
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@ func Routes(r *gin.Engine) {
r.POST("/users", controllers.CreateUser)
r.GET("/users/:id", controllers.GetUser)
r.GET("/users/all", controllers.GetAllUsers)
r.GET("/users/all/:chaintype_id", controllers.GetAllUsersByChainType)
r.PUT("/users/:id", controllers.UpdateUser)
r.DELETE("/users/:id", controllers.DeleteUser)

// Brand routes
r.POST("/brands", controllers.CreateBrand)
r.GET("/brands/:id", controllers.GetBrand)
r.GET("/brands/all", controllers.GetAllBrands)
r.GET("/brands/all/:chaintype_id", controllers.GetAllBrands)
r.PUT("/brands/:id", controllers.UpdateBrand)
r.DELETE("/brands/:id", controllers.DeleteBrand)
r.GET("/brands/manager/:manager_id", controllers.GetBrandsByManager)
Expand All @@ -50,45 +51,45 @@ func Routes(r *gin.Engine) {
r.POST("/collections", controllers.CreateCollection)
r.GET("/collections/:id", controllers.GetCollection)
r.GET("/collections/brand-id/:brandId", controllers.GetCollectionByBrandId)
r.GET("/collections/all", controllers.GetAllCollections)
r.GET("/collections/all/:chaintype_id", controllers.GetAllCollections)
r.PUT("/collections/:id", controllers.UpdateCollection)
r.PUT("/collections/brand-id/:brandId", controllers.UpdateCollectionByBrandId)
r.DELETE("/collections/:id", controllers.DeleteCollection)

// Phygital routes
r.POST("/phygitals", controllers.CreatePhygital)
r.GET("/phygitals/:id", controllers.GetPhygital)
r.GET("/phygitals/all", controllers.GetAllPhygital)
r.GET("/phygitals/all/:chaintype_id", controllers.GetAllPhygital)
r.PUT("/phygitals/:id", controllers.UpdatePhygital)
r.DELETE("/phygitals/:id", controllers.DeletePhygital)

// WebXR routes
r.POST("/webxr", controllers.CreateWebXR)
r.GET("/webxr/:id", controllers.GetWebXR)
r.GET("/webxr/all", controllers.GetAllWebXR)
r.GET("/webxr/all/:chaintype_id", controllers.GetAllWebXR)
r.PUT("/webxr/:id", controllers.UpdateWebXR)
r.DELETE("/webxr/:id", controllers.DeleteWebXR)
r.GET("/webxr/phygital/:phygital_id", controllers.GetWebXRByPhygitalID)

// Avatar routes
r.POST("/avatars", controllers.CreateAvatar)
r.GET("/avatars/:id", controllers.GetAvatar)
r.GET("/avatars/all", controllers.GetAllAvatars)
r.GET("/avatars/all/:chaintype_id", controllers.GetAllAvatars)
r.PUT("/avatars/:id", controllers.UpdateAvatar)
r.DELETE("/avatars/:id", controllers.DeleteAvatar)
r.GET("/avatars/phygital/:phygital_id", controllers.GetAvatarByPhygitalID)

// Variant routes
r.POST("/variants", controllers.CreateVariant)
r.GET("/variants/:id", controllers.GetVariant)
r.GET("/variants/all", controllers.GetAllVariant)
r.GET("/variants/all/:chaintype_id", controllers.GetAllVariant)
r.PUT("/variants/:id", controllers.UpdateVariant)
r.DELETE("/variants/:id", controllers.DeleteVariant)

//FanToken routes
r.POST("/fantoken", controllers.CreateFanToken)
r.GET("/fantoken/:id" , controllers.GetFanToken)
r.GET("fantoken/all" , controllers.GetAllFanToken)
r.GET("fantoken/all/:chaintype_id" , controllers.GetAllFanToken)
r.PUT("fantoken/:id" , controllers.UpdateFanToken)
r.DELETE("fantoken/:id" , controllers.DeleteFanToken)

Expand Down

0 comments on commit c2b8704

Please sign in to comment.