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

@ -2,7 +2,7 @@ mod connection_pool;
use crate::{
auth,
db::{self, DefaultDb, ProjectId, RoomId, User, UserId},
db::{self, Database, ProjectId, RoomId, User, UserId},
AppState, Result,
};
use anyhow::anyhow;
@ -128,10 +128,10 @@ impl fmt::Debug for Session {
}
}
struct DbHandle(Arc<DefaultDb>);
struct DbHandle(Arc<Database>);
impl Deref for DbHandle {
type Target = DefaultDb;
type Target = Database;
fn deref(&self) -> &Self::Target {
self.0.as_ref()