add: journals base

add: avatar/banner upload endpoints
This commit is contained in:
trisua 2025-03-23 18:03:11 -04:00
parent b3cac5f97a
commit bb682add85
14 changed files with 323 additions and 22 deletions

View file

@ -0,0 +1,21 @@
use crate::{
database::drivers::common,
execute,
model::{Error, Result},
};
use super::DataManager;
impl DataManager {
pub async fn init(&self) -> Result<()> {
let conn = match self.connect().await {
Ok(c) => c,
Err(e) => return Err(Error::DatabaseConnection(e.to_string())),
};
execute!(&conn, common::CREATE_TABLE_USERS, []).unwrap();
execute!(&conn, common::CREATE_TABLE_PAGES, []).unwrap();
Ok(())
}
}