mirror of
https://github.com/iv-org/invidious.git
synced 2025-08-28 23:48:31 +00:00
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"
|
return templated "user/remove_2fa"
|
||||||
end
|
end
|
||||||
|
|
||||||
# Remove 2fa post request.
|
# Handles requests to remove 2fa on an user account
|
||||||
def remove_2fa(env)
|
def remove_2fa(env)
|
||||||
locale = env.get("preferences").as(Preferences).locale
|
locale = env.get("preferences").as(Preferences).locale
|
||||||
|
|
||||||
@ -547,5 +547,6 @@ module Invidious::Routes::Account
|
|||||||
end
|
end
|
||||||
|
|
||||||
PG_DB.exec("UPDATE users SET totp_secret = $1 WHERE email = $2", nil, user.email)
|
PG_DB.exec("UPDATE users SET totp_secret = $1 WHERE email = $2", nil, user.email)
|
||||||
|
env.redirect referer
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user