fix: app port and check subscribe_plan_id

This commit is contained in:
ericprd
2025-02-26 22:50:13 +08:00
parent 0100134527
commit 46472d01fe
4 changed files with 11 additions and 8 deletions
+7 -3
View File
@@ -15,9 +15,13 @@ func (a *AuthSvc) RegisterUser(spec authdomain.RegisterUserReq) (string, error)
return "", errors.New("this email address is already in use")
}
subsId, err := a.subsRepo.Create(spec.SubscribePlanID)
if err != nil {
return "", nil
var subsId string
if spec.SubscribePlanID != "" {
subsId, err = a.subsRepo.Create(spec.SubscribePlanID)
if err != nil {
return "", nil
}
}
hashedPwd, err := HashPassword(spec.Password)