summaryrefslogtreecommitdiffci
path: root/internal/mailer
diff options
from:
to:
context:
space:
mode:
authorGravatar SayaAndy <saya.andy@posteo.com> 2025-10-23 19:32:11 +0700
committerGravatar SayaAndy <saya.andy@posteo.com> 2025-10-23 19:32:11 +0700
commitf101d6a555c6d3453def332f2c230b37ae5c81b4 (patch)
tree53e78a7394c72eb647b09da3bd3e0fe1a74f2d54 /internal/mailer
parent84c851eeb4c13042a928b6b6334675d126931a38 (diff)
downloadweb-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')
-rw-r--r--internal/mailer/mailer.go7
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() {
+
+}