feat: complete superadmin management endpoints
This commit is contained in:
@@ -27,6 +27,28 @@ func (c *contents) List(ctx fiber.Ctx, filter *dto.SuperContentListFilter) (*req
|
||||
return services.Super.ListContents(ctx, filter)
|
||||
}
|
||||
|
||||
// List tenant contents
|
||||
//
|
||||
// @Router /super/v1/tenants/:tenantID<int>/contents [get]
|
||||
// @Summary List tenant contents
|
||||
// @Description List contents by tenant
|
||||
// @Tags Content
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param tenantID path int64 true "Tenant ID"
|
||||
// @Param page query int false "Page number"
|
||||
// @Param limit query int false "Page size"
|
||||
// @Success 200 {object} requests.Pager{items=[]dto.AdminContentItem}
|
||||
// @Bind tenantID path
|
||||
// @Bind filter query
|
||||
func (c *contents) ListTenantContents(ctx fiber.Ctx, tenantID int64, filter *dto.SuperContentListFilter) (*requests.Pager, error) {
|
||||
if filter == nil {
|
||||
filter = &dto.SuperContentListFilter{}
|
||||
}
|
||||
filter.TenantID = &tenantID
|
||||
return services.Super.ListContents(ctx, filter)
|
||||
}
|
||||
|
||||
// Update content status
|
||||
//
|
||||
// @Router /super/v1/tenants/:tenantID<int>/contents/:contentID<int>/status [patch]
|
||||
|
||||
Reference in New Issue
Block a user