Start using the new sea-orm backed database

This commit is contained in:
Antonio Scandurra 2022-12-01 14:40:37 +01:00
parent 19d14737bf
commit d2385bd6a0
21 changed files with 1131 additions and 4902 deletions

View file

@ -75,7 +75,7 @@ pub async fn validate_header<B>(mut req: Request<B>, next: Next<B>) -> impl Into
const MAX_ACCESS_TOKENS_TO_STORE: usize = 8;
pub async fn create_access_token(db: &db::DefaultDb, user_id: UserId) -> Result<String> {
pub async fn create_access_token(db: &db::Database, user_id: UserId) -> Result<String> {
let access_token = rpc::auth::random_token();
let access_token_hash =
hash_access_token(&access_token).context("failed to hash access token")?;