Redirect to referer after 2fa removal

This commit is contained in:
syeopite 2021-07-16 14:34:31 -07:00
parent d51d53e04b
commit e93c8672b4
No known key found for this signature in database
GPG Key ID: A73C186DA3955A1A

View File

@ -524,7 +524,7 @@ module Invidious::Routes::Account
return templated "user/remove_2fa"
end
# Remove 2fa post request.
# Handles requests to remove 2fa on an user account
def remove_2fa(env)
locale = env.get("preferences").as(Preferences).locale
@ -547,5 +547,6 @@ module Invidious::Routes::Account
end
PG_DB.exec("UPDATE users SET totp_secret = $1 WHERE email = $2", nil, user.email)
env.redirect referer
end
end