api, frontend: add account deletion

Closes https://gitlab.com/commento/commento/issues/120
This commit is contained in:
Adhityaa Chandrasekar
2020-01-02 13:41:07 -08:00
parent 80dc91ca05
commit dc24a40a37
11 changed files with 249 additions and 5 deletions

View File

@@ -92,10 +92,8 @@ func ownerNewHandler(w http.ResponseWriter, r *http.Request) {
return
}
if _, err := commenterNew(*x.Email, *x.Name, "undefined", "undefined", "commento", *x.Password); err != nil {
bodyMarshal(w, response{"success": false, "message": err.Error()})
return
}
// Errors in creating a commenter account should not hold this up.
_, _ = commenterNew(*x.Email, *x.Name, "undefined", "undefined", "commento", *x.Password)
bodyMarshal(w, response{"success": true, "confirmEmail": smtpConfigured})
}