Redirect to referer after 2fa removal

This commit is contained in:
syeopite 2021-07-16 14:34:31 -07:00
parent 361d96bf74
commit 413de9c0b1
No known key found for this signature in database
GPG key ID: 6FA616E5A5294A82

View file

@ -69,6 +69,7 @@ class Invidious::Routes::Accounts < Invidious::Routes::BaseRoute
end
PG_DB.exec("UPDATE users SET totp_secret = $1 WHERE email = $2", nil, user.email)
env.redirect referer
end
# Handles requests to setup 2fa on an user account