You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-11-20 12:02:22 +03:00
Better compatibility sessions pagination and filtering
This commit is contained in:
@@ -23,8 +23,11 @@ use ulid::Ulid;
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::{
|
||||
pagination::QueryBuilderExt, sea_query_sqlx::map_values, tracing::ExecuteExt, DatabaseError,
|
||||
DatabaseInconsistencyError, LookupResultExt,
|
||||
iden::{UserSessions, Users},
|
||||
pagination::QueryBuilderExt,
|
||||
sea_query_sqlx::map_values,
|
||||
tracing::ExecuteExt,
|
||||
DatabaseError, DatabaseInconsistencyError,
|
||||
};
|
||||
|
||||
/// An implementation of [`BrowserSessionRepository`] for a PostgreSQL
|
||||
@@ -52,23 +55,6 @@ struct SessionLookup {
|
||||
user_primary_user_email_id: Option<Uuid>,
|
||||
}
|
||||
|
||||
#[derive(sea_query::Iden)]
|
||||
enum UserSessions {
|
||||
Table,
|
||||
UserSessionId,
|
||||
CreatedAt,
|
||||
FinishedAt,
|
||||
UserId,
|
||||
}
|
||||
|
||||
#[derive(sea_query::Iden)]
|
||||
enum Users {
|
||||
Table,
|
||||
UserId,
|
||||
Username,
|
||||
PrimaryUserEmailId,
|
||||
}
|
||||
|
||||
impl TryFrom<SessionLookup> for BrowserSession {
|
||||
type Error = DatabaseInconsistencyError;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user