summaryrefslogtreecommitdiff
path: root/src/ui/routes/path.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/routes/path.rs')
-rw-r--r--src/ui/routes/path.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ui/routes/path.rs b/src/ui/routes/path.rs
new file mode 100644
index 0000000..2e9a657
--- /dev/null
+++ b/src/ui/routes/path.rs
@@ -0,0 +1,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)
+ }
+}