mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-10 07:22:16 +05:30
Redirect to referer after 2fa removal
This commit is contained in:
parent
d51d53e04b
commit
e93c8672b4
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user