make Authenticator non-generic

This commit is contained in:
deneb 2024-02-10 12:56:35 +01:00
parent 399ed56b74
commit d195147f35

View file

@ -4,16 +4,16 @@ use tokio::sync::Mutex;
use tracing::instrument; use tracing::instrument;
use crate::{ use crate::{
db::{Database, SqliteDatabase}, db::{/* Database, */ SqliteDatabase},
secrets::{Password, UserToken}, secrets::{Password, UserToken},
}; };
#[derive(Debug)] #[derive(Debug)]
pub struct Authenticator<DB: Database> { pub struct Authenticator {
db: Arc<Mutex<DB>>, db: Arc<Mutex<SqliteDatabase>>,
} }
impl Authenticator<SqliteDatabase> { impl Authenticator {
pub fn new(db: Arc<Mutex<SqliteDatabase>>) -> Self { pub fn new(db: Arc<Mutex<SqliteDatabase>>) -> Self {
Self { db } Self { db }
} }