blob: fc2ab754dc911b8181d0ccdb776581c4726d8e81 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
use config::Config;
use db::Database;
mod artist;
mod artwork;
mod comment;
pub mod config;
mod db;
mod error;
mod file;
pub mod routes;
mod ructe_poem;
pub type Result<T> = std::result::Result<T, error::Error>;
#[derive(Clone)]
pub struct Critch {
db: Database,
config: Config,
}
impl Critch {
pub async fn new(config: Config) -> Self {
let db = Database::new(config.database_connection()).await;
Self { db, config }
}
}
|