Просмотр исходного кода

Merge pull request #422 from porter-dev/beta.3.email-integration

Fix email integration minor bugs
abelanger5 5 лет назад
Родитель
Сommit
179a5fcfcd
1 измененных файлов с 4 добавлено и 3 удалено
  1. 4 3
      server/api/user_handler.go

+ 4 - 3
server/api/user_handler.go

@@ -106,8 +106,6 @@ func (app *App) HandleAuthCheck(w http.ResponseWriter, r *http.Request) {
 
 	user, err := app.Repo.User.ReadUser(userID)
 
-	fmt.Println("EMAIL VERIFIED IS", user.EmailVerified)
-
 	if err != nil {
 		http.Error(w, err.Error(), http.StatusInternalServerError)
 		return
@@ -560,7 +558,7 @@ func (app *App) InitiatePWResetUser(w http.ResponseWriter, r *http.Request) {
 		}
 
 		err = sgClient.SendGHPWEmail(
-			fmt.Sprintf("%s/api//oauth/login/github", app.ServerConf.ServerURL),
+			fmt.Sprintf("%s/api/oauth/login/github", app.ServerConf.ServerURL),
 			form.Email,
 		)
 
@@ -568,6 +566,9 @@ func (app *App) InitiatePWResetUser(w http.ResponseWriter, r *http.Request) {
 			app.handleErrorInternal(err, w)
 			return
 		}
+
+		w.WriteHeader(http.StatusOK)
+		return
 	}
 
 	// convert the form to a project model