mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-04-11.git
synced 2024-08-15 00:43:26 +00:00
Add new user field for totp secret
This commit is contained in:
parent
3e5c353298
commit
92b76e20de
1 changed files with 3 additions and 0 deletions
|
@ -10,6 +10,7 @@ struct User
|
||||||
property notifications : Array(String)
|
property notifications : Array(String)
|
||||||
property subscriptions : Array(String)
|
property subscriptions : Array(String)
|
||||||
property email : String
|
property email : String
|
||||||
|
property totp_secret : String?
|
||||||
|
|
||||||
@[DB::Field(converter: User::PreferencesConverter)]
|
@[DB::Field(converter: User::PreferencesConverter)]
|
||||||
property preferences : Preferences
|
property preferences : Preferences
|
||||||
|
@ -365,6 +366,7 @@ def fetch_user(sid, headers, db)
|
||||||
token: token,
|
token: token,
|
||||||
watched: [] of String,
|
watched: [] of String,
|
||||||
feed_needs_update: true,
|
feed_needs_update: true,
|
||||||
|
totp_secret: nil,
|
||||||
})
|
})
|
||||||
return user, sid
|
return user, sid
|
||||||
end
|
end
|
||||||
|
@ -383,6 +385,7 @@ def create_user(sid, email, password)
|
||||||
token: token,
|
token: token,
|
||||||
watched: [] of String,
|
watched: [] of String,
|
||||||
feed_needs_update: true,
|
feed_needs_update: true,
|
||||||
|
totp_secret: nil,
|
||||||
})
|
})
|
||||||
|
|
||||||
return user, sid
|
return user, sid
|
||||||
|
|
Loading…
Reference in a new issue