Sqlite
This commit is contained in:
parent
bd4bd58612
commit
9d4fa9a220
49 changed files with 1525 additions and 681 deletions
|
@ -1,7 +1,5 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use super::{State, DEVICE_ID_LENGTH, TOKEN_LENGTH};
|
||||
use crate::{utils, ConduitResult, Database, Error, Ruma};
|
||||
use super::{DEVICE_ID_LENGTH, TOKEN_LENGTH};
|
||||
use crate::{database::DatabaseGuard, utils, ConduitResult, Error, Ruma};
|
||||
use log::info;
|
||||
use ruma::{
|
||||
api::client::{
|
||||
|
@ -52,7 +50,7 @@ pub async fn get_login_types_route() -> ConduitResult<get_login_types::Response>
|
|||
)]
|
||||
#[tracing::instrument(skip(db, body))]
|
||||
pub async fn login_route(
|
||||
db: State<'_, Arc<Database>>,
|
||||
db: DatabaseGuard,
|
||||
body: Ruma<login::Request<'_>>,
|
||||
) -> ConduitResult<login::Response> {
|
||||
// Validate login method
|
||||
|
@ -169,7 +167,7 @@ pub async fn login_route(
|
|||
)]
|
||||
#[tracing::instrument(skip(db, body))]
|
||||
pub async fn logout_route(
|
||||
db: State<'_, Arc<Database>>,
|
||||
db: DatabaseGuard,
|
||||
body: Ruma<logout::Request>,
|
||||
) -> ConduitResult<logout::Response> {
|
||||
let sender_user = body.sender_user.as_ref().expect("user is authenticated");
|
||||
|
@ -197,7 +195,7 @@ pub async fn logout_route(
|
|||
)]
|
||||
#[tracing::instrument(skip(db, body))]
|
||||
pub async fn logout_all_route(
|
||||
db: State<'_, Arc<Database>>,
|
||||
db: DatabaseGuard,
|
||||
body: Ruma<logout_all::Request>,
|
||||
) -> ConduitResult<logout_all::Response> {
|
||||
let sender_user = body.sender_user.as_ref().expect("user is authenticated");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue