You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-07-31 09:24:31 +03:00
storage: Load with less joins
This is done to simplify some queries, to avoid loading more data than necessary, and in preparation of a proper cache layer
This commit is contained in:
@ -23,8 +23,6 @@ use thiserror::Error;
|
||||
use ulid::Ulid;
|
||||
use url::Url;
|
||||
|
||||
use crate::User;
|
||||
|
||||
static DEVICE_ID_LENGTH: usize = 10;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
|
||||
@ -85,7 +83,7 @@ impl TryFrom<String> for Device {
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
|
||||
pub struct CompatSession {
|
||||
pub id: Ulid,
|
||||
pub user: User,
|
||||
pub user_id: Ulid,
|
||||
pub device: Device,
|
||||
pub created_at: DateTime<Utc>,
|
||||
pub finished_at: Option<DateTime<Utc>>,
|
||||
|
@ -16,13 +16,10 @@ use oauth2_types::scope::Scope;
|
||||
use serde::Serialize;
|
||||
use ulid::Ulid;
|
||||
|
||||
use super::client::Client;
|
||||
use crate::users::BrowserSession;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
|
||||
pub struct Session {
|
||||
pub id: Ulid,
|
||||
pub browser_session: BrowserSession,
|
||||
pub client: Client,
|
||||
pub user_session_id: Ulid,
|
||||
pub client_id: Ulid,
|
||||
pub scope: Scope,
|
||||
}
|
||||
|
Reference in New Issue
Block a user