diff options
Diffstat (limited to 'src/ui/routes/path.rs')
| -rw-r--r-- | src/ui/routes/path.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ui/routes/path.rs b/src/ui/routes/path.rs new file mode 100644 index 0000000..a387552 --- /dev/null +++ b/src/ui/routes/path.rs @@ -0,0 +1,9 @@ +pub mod get { + use axum::extract::Path; + + use crate::ui::assets::{Asset, Assets, Error}; + + pub async fn handler(Path(path): Path<String>) -> Result<Asset, Error> { + Assets::load(path) + } +} |
