summaryrefslogtreecommitdiff
path: root/src/ui/routes/path.rs
blob: 2e9a657762be2a040f4a20464e13ccb88bb74c65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
pub mod get {
    use axum::extract::Path;

    use crate::ui::{
        assets::{Asset, Assets},
        error::NotFound,
    };

    pub async fn handler(Path(path): Path<String>) -> Result<Asset, NotFound<String>> {
        Assets::load(path)
    }
}