feat(kol): marketplace + admin subscription HTTP endpoints
This commit is contained in:
@@ -74,6 +74,24 @@ func RegisterRoutes(app *bootstrap.App) {
|
||||
kolManage.POST("/assist", kolManageHandler.AssistSubmit)
|
||||
kolManage.GET("/assist/:id", kolManageHandler.AssistGet)
|
||||
|
||||
kolMarketplace := protected.Group("/tenant/kol/marketplace")
|
||||
kolMarketplaceHandler := NewKolMarketplaceHandler(app)
|
||||
kolMarketplace.GET("/packages", kolMarketplaceHandler.ListPackages)
|
||||
kolMarketplace.GET("/packages/:id", kolMarketplaceHandler.GetPackage)
|
||||
kolMarketplace.POST("/packages/:id/subscribe", kolMarketplaceHandler.Subscribe)
|
||||
|
||||
kolSubscriptions := protected.Group("/tenant/kol")
|
||||
kolSubscriptions.GET("/subscriptions", kolMarketplaceHandler.ListSubscriptions)
|
||||
kolSubscriptions.GET("/subscription-prompts", kolMarketplaceHandler.ListSubscriptionPrompts)
|
||||
|
||||
// V1 compromise: these admin operations live on tenant-api and are gated by
|
||||
// tenant_role=tenant_admin until the platform-api/module is built.
|
||||
kolAdmin := protected.Group("/tenant/kol/admin")
|
||||
kolAdminHandler := NewKolAdminHandler(app)
|
||||
kolAdmin.PUT("/subscriptions/:id/approve", kolAdminHandler.ApproveSubscription)
|
||||
kolAdmin.POST("/subscriptions", kolAdminHandler.ManualBind)
|
||||
kolAdmin.PUT("/subscriptions/:id/revoke", kolAdminHandler.RevokeSubscription)
|
||||
|
||||
articles := protected.Group("/tenant/articles")
|
||||
artHandler := NewArticleHandler(app)
|
||||
articles.GET("", artHandler.List)
|
||||
|
||||
Reference in New Issue
Block a user