feat: add superadmin creator review and coupon governance
This commit is contained in:
@@ -29,6 +29,40 @@ func (c *coupons) List(ctx fiber.Ctx, filter *dto.SuperCouponListFilter) (*reque
|
||||
return services.Super.ListCoupons(ctx, filter)
|
||||
}
|
||||
|
||||
// List coupon grants
|
||||
//
|
||||
// @Router /super/v1/coupon-grants [get]
|
||||
// @Summary List coupon grants
|
||||
// @Description List coupon grant records across tenants
|
||||
// @Tags Coupon
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param page query int false "Page number"
|
||||
// @Param limit query int false "Page size"
|
||||
// @Success 200 {object} requests.Pager{items=[]dto.SuperCouponGrantItem}
|
||||
// @Bind filter query
|
||||
func (c *coupons) ListGrants(ctx fiber.Ctx, filter *dto.SuperCouponGrantListFilter) (*requests.Pager, error) {
|
||||
return services.Super.ListCouponGrants(ctx, filter)
|
||||
}
|
||||
|
||||
// Update coupon status
|
||||
//
|
||||
// @Router /super/v1/coupons/:id<int>/status [patch]
|
||||
// @Summary Update coupon status
|
||||
// @Description Update coupon status across tenants
|
||||
// @Tags Coupon
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param id path int64 true "Coupon ID"
|
||||
// @Param form body dto.SuperCouponStatusUpdateForm true "Update form"
|
||||
// @Success 200 {string} string "Updated"
|
||||
// @Bind user local key(__ctx_user)
|
||||
// @Bind id path
|
||||
// @Bind form body
|
||||
func (c *coupons) UpdateStatus(ctx fiber.Ctx, user *models.User, id int64, form *dto.SuperCouponStatusUpdateForm) error {
|
||||
return services.Super.UpdateCouponStatus(ctx, user.ID, id, form)
|
||||
}
|
||||
|
||||
// Create coupon
|
||||
//
|
||||
// @Router /super/v1/tenants/:tenantID<int>/coupons [post]
|
||||
|
||||
Reference in New Issue
Block a user