updated api to create totp struct, get totp secret directly if it exists
This commit is contained in:
parent
e70d035c86
commit
f891d2f940
4 changed files with 18 additions and 20 deletions
|
|
@ -50,7 +50,10 @@ impl User {
|
|||
)
|
||||
}
|
||||
|
||||
async fn get_by_id(conn: impl SqliteExecutor<'_>, id: &UserID) -> Result<Option<Self>, Error> {
|
||||
pub async fn get_by_id(
|
||||
conn: impl SqliteExecutor<'_>,
|
||||
id: &UserID,
|
||||
) -> Result<Option<Self>, Error> {
|
||||
Ok(DatabaseUsers::get_one_by_id(conn, &id.0)
|
||||
.await?
|
||||
.map(Self::from))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue