fix some api key stuff

This commit is contained in:
Wim Brand
2020-02-21 14:09:13 +01:00
parent 7a67d8c33f
commit 4de17609bb
7 changed files with 21 additions and 14 deletions

View File

@@ -133,7 +133,9 @@ func (wc *WebController) serveEmailConfirm(
) {
var status string
if key, err := wc.getAPIKey(r); err == nil {
err = pixelapi.New(wc.apiURLInternal, key).UserEmailResetConfirm(r.FormValue("key"))
api := pixelapi.New(wc.apiURLInternal)
api.APIKey = key
err = api.UserEmailResetConfirm(r.FormValue("key"))
if err != nil && err.Error() == "not_found" {
status = "not_found"
} else if err != nil {