fix(subscribe): update subscription availability check to allow status greater than 1
This commit is contained in:
parent
ea74e4b7d5
commit
38bcacc9e7
@ -78,7 +78,7 @@ func (l *SubscribeLogic) getUserSubscribe(token string) (*user.Subscribe, error)
|
|||||||
return nil, errors.Wrapf(xerr.NewErrCode(xerr.DatabaseQueryError), "find subscribe error: %v", err.Error())
|
return nil, errors.Wrapf(xerr.NewErrCode(xerr.DatabaseQueryError), "find subscribe error: %v", err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
if userSub.Status != 1 {
|
if userSub.Status > 1 {
|
||||||
l.Infow("[Generate Subscribe]subscribe is not available", logger.Field("status", int(userSub.Status)), logger.Field("token", token))
|
l.Infow("[Generate Subscribe]subscribe is not available", logger.Field("status", int(userSub.Status)), logger.Field("token", token))
|
||||||
return nil, errors.Wrapf(xerr.NewErrCode(xerr.SubscribeNotAvailable), "subscribe is not available")
|
return nil, errors.Wrapf(xerr.NewErrCode(xerr.SubscribeNotAvailable), "subscribe is not available")
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user