chore: stabilize lint and verify builds
This commit is contained in:
@@ -55,14 +55,15 @@ type Creator struct{}
|
||||
// @Bind user local key(__ctx_user)
|
||||
// @Bind id path
|
||||
// @Bind form body
|
||||
func (c *Creator) GrantCoupon(ctx fiber.Ctx, user *models.User, id int64, form *dto.CouponGrantForm) (string, error) {
|
||||
func (c *Creator) GrantCoupon(ctx fiber.Ctx, _ *models.User, id int64, form *dto.CouponGrantForm) (string, error) {
|
||||
tenantID := getTenantID(ctx)
|
||||
if form == nil {
|
||||
return "", errorx.ErrInvalidParameter.WithMsg("参数无效")
|
||||
}
|
||||
_, err := services.Coupon.Grant(ctx, tenantID, id, form.UserIDs)
|
||||
if err != nil {
|
||||
return "", err
|
||||
return "", errorx.ErrOperationFailed.WithCause(err)
|
||||
}
|
||||
|
||||
return "Granted", nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user