fix: app port and check subscribe_plan_id
This commit is contained in:
@@ -22,7 +22,7 @@ func Router(apiRouter chi.Router) {
|
||||
defer stop()
|
||||
|
||||
svr := &http.Server{
|
||||
Addr: fmt.Sprintf(":%d", APP_PORT),
|
||||
Addr: fmt.Sprintf(":%d", config.APP_PORT),
|
||||
Handler: mainRouter,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
package pkgconfig
|
||||
|
||||
const APP_PORT = 3000
|
||||
const GRACEFULL_TIMEOUT = 20
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user