Coverage Report

Created: 2024-02-20 21:15

/builds/xfbs/cindy/src/server.rs
Line
Count
Source
1
use crate::Cindy;
2
use axum::Router;
3
4
mod api;
5
mod error;
6
mod frontend;
7
8
use error::Error;
9
10
16
fn router() -> Router<Cindy> {
11
16
    Router::new()
12
16
        .nest("/api/v1", api::router())
13
16
        .merge(frontend::router())
14
16
}
15
16
impl Cindy {
17
16
    pub fn router(&self) -> Router {
18
16
        router().with_state(self.clone())
19
16
    }
20
}