Coverage Report

Created: 2024-02-20 21:15

/builds/xfbs/cindy/src/server/api.rs
Line
Count
Source
1
use crate::{server::Error, Cindy};
2
use axum::Router;
3
4
mod file;
5
mod query;
6
mod tags;
7
8
1
async fn not_found() -> Error {
9
1
    Error::NotFound
10
1
}
11
12
16
pub fn router() -> Router<Cindy> {
13
16
    Router::new()
14
16
        .nest("/file", file::router())
15
16
        .nest("/query", query::router())
16
16
        .merge(tags::router())
17
16
        .fallback(not_found)
18
16
}