|
|
@@ -3187,8 +3187,7 @@ func subscribe(w http.ResponseWriter, db *sql.DB, r *http.Request) { |
|
|
|
// easier testing of the endpoint. |
|
|
|
err = user.Sub.insertSub(db) |
|
|
|
if err != nil { |
|
|
|
// http.Error(w, err.Error(), 500) |
|
|
|
json.NewEncoder(w).Encode(s) |
|
|
|
http.Error(w, err.Error(), 500) |
|
|
|
return |
|
|
|
} |
|
|
|
} else { |
|
|
@@ -3539,16 +3538,16 @@ func (user *User) sendVerificationEmail() { |
|
|
|
AddTo(user.Email). |
|
|
|
SetSubject("Email Verification") |
|
|
|
|
|
|
|
message := `To: %s |
|
|
|
Subject: Email Verification |
|
|
|
|
|
|
|
Welcome %s, |
|
|
|
Click the link below to verify your email address |
|
|
|
https://skouter.net?verification_token=%s` |
|
|
|
message := `Welcome %s, |
|
|
|
Click the link below to verify your email address |
|
|
|
https://%s?verification_token=%s` |
|
|
|
|
|
|
|
t, err := verificationToken(user.Id) |
|
|
|
|
|
|
|
message = fmt.Sprintf(message, user.Email, user.FirstName, t) |
|
|
|
message = fmt.Sprintf(message, |
|
|
|
user.FirstName, |
|
|
|
os.Getenv("SKOUTER_DOMAIN"), |
|
|
|
t) |
|
|
|
|
|
|
|
email.SetBody(mailer.TextPlain, message) |
|
|
|
|
|
|
@@ -4080,9 +4079,6 @@ func dev(args []string) { |
|
|
|
} |
|
|
|
|
|
|
|
func check(args []string) { |
|
|
|
os.Setenv("DB_NAME", "skouter_dev") |
|
|
|
os.Setenv("DB_USER", "tester") |
|
|
|
os.Setenv("DB_PASSWORD", "test123") |
|
|
|
files := http.FileServer(http.Dir("")) |
|
|
|
|
|
|
|
http.Handle("/assets/", files) |
|
|
|