fix
This commit is contained in:
parent
eccbc3c3d6
commit
7feae78de0
1 changed files with 2 additions and 2 deletions
|
@ -41,7 +41,7 @@ pub trait Sessions {
|
||||||
fn api_key(&self, name: &str) -> impl std::future::Future<Output = Session>;
|
fn api_key(&self, name: &str) -> impl std::future::Future<Output = Session>;
|
||||||
fn session(&self) -> impl std::future::Future<Output = Session>;
|
fn session(&self) -> impl std::future::Future<Output = Session>;
|
||||||
fn list_sessions(&self) -> impl std::future::Future<Output = Vec<Session>>;
|
fn list_sessions(&self) -> impl std::future::Future<Output = Vec<Session>>;
|
||||||
fn end_session(&self, id: &str) -> impl std::future::Future<Output = ()>;
|
fn end_session(&self, id: &uuid::Uuid) -> impl std::future::Future<Output = ()>;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Sessions for User {
|
impl Sessions for User {
|
||||||
|
@ -60,7 +60,7 @@ impl Sessions for User {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// End a user session
|
/// End a user session
|
||||||
async fn end_session(&self, id: &str) {
|
async fn end_session(&self, id: &uuid::Uuid) {
|
||||||
sqlx::query("DELETE FROM user_session WHERE id = $1 AND \"user\" = $2")
|
sqlx::query("DELETE FROM user_session WHERE id = $1 AND \"user\" = $2")
|
||||||
.bind(id)
|
.bind(id)
|
||||||
.bind(&self.username)
|
.bind(&self.username)
|
||||||
|
|
Loading…
Add table
Reference in a new issue