diff options
| author | 2025-10-23 19:32:11 +0700 | |
|---|---|---|
| committer | 2025-10-23 19:32:11 +0700 | |
| commit | f101d6a555c6d3453def332f2c230b37ae5c81b4 (patch) | |
| tree | 53e78a7394c72eb647b09da3bd3e0fe1a74f2d54 /internal/mailer/mailer.go | |
| parent | 84c851eeb4c13042a928b6b6334675d126931a38 (diff) | |
| download | web-f101d6a555c6d3453def332f2c230b37ae5c81b4.tar.gz web-f101d6a555c6d3453def332f2c230b37ae5c81b4.zip | |
fix: disable subscription form if user has no verified email
fix: check properly if the email was already taken
Diffstat (limited to 'internal/mailer/mailer.go')
| -rw-r--r-- | internal/mailer/mailer.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/internal/mailer/mailer.go b/internal/mailer/mailer.go index cd5eda8..ba2202e 100644 --- a/internal/mailer/mailer.go +++ b/internal/mailer/mailer.go @@ -145,7 +145,8 @@ func (m *Mailer) MailIsTaken(email string) (bool, error) { defer tx.Commit() defer rows.Close() - return rows.Next(), nil + isTaken := rows.Next() + return isTaken, nil } func (m *Mailer) GetInfo(userId string) (email string, lang string, err error) { @@ -355,3 +356,7 @@ func (m *Mailer) Subscribe(userId string, subscriptionType SubscriptionType, tag return nil } + +func SendNewPost() { + +} |