Add new user field for totp secret

This commit is contained in:
syeopite 2021-07-14 22:18:01 -07:00
parent 3e5c353298
commit 92b76e20de
No known key found for this signature in database
GPG key ID: 6FA616E5A5294A82

View file

@ -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