dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

commit d72cacb55307c30980be09425fc930b75e84451b
parent 3f51be3221b45c475a47082860b27d9d1f05e2fb
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Sun,  8 Jan 2023 00:11:26 -0800

cleanup

Diffstat:
Mpkg/web/handlers/handlers.go | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/pkg/web/handlers/handlers.go b/pkg/web/handlers/handlers.go @@ -3607,9 +3607,7 @@ func TwoFactorAuthenticationVerifyHandler(c echo.Context) error { c.SetCookie(hutils.DeleteCookie(hutils.AuthCookieName)) authUser.TwoFactorSecret = database.EncryptedString(twoFactor.key.Secret()) authUser.TwoFactorRecovery = string(h) - if err := authUser.Save(); err != nil { - logrus.Error(err) - } + authUser.DoSave() database.CreateSecurityLog(authUser.ID, database.TotpEnabledSecurityLog) return c.Render(http.StatusOK, "flash", FlashResponse{"Two-factor authentication enabled", "/", "alert-success"}) }