From 988c22db2375660e16912ce91e706b9fbd0334a6 Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Mon, 21 Oct 2024 21:47:02 +0200 Subject: [PATCH] changed the url as requested --- docs/src/sources-sprites.md | 4 ++-- martin/src/srv/sprites.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/src/sources-sprites.md b/docs/src/sources-sprites.md index 1bcbc9ccb..ac865b12c 100644 --- a/docs/src/sources-sprites.md +++ b/docs/src/sources-sprites.md @@ -51,8 +51,8 @@ If you want multiple colors, you will need to layer icons on top of each other. The following APIs are available: -- `/sprite/sdf/.json` for getting a sprite index as SDF and -- `/sprite/sdf/.png` for getting sprite PNGs as SDF +- `/sdf_sprite/.json` for getting a sprite index as SDF and +- `/sdf_sprite/.png` for getting sprite PNGs as SDF #### Combining Multiple Sprites diff --git a/martin/src/srv/sprites.rs b/martin/src/srv/sprites.rs index 2cd2811dd..d9d4c2845 100644 --- a/martin/src/srv/sprites.rs +++ b/martin/src/srv/sprites.rs @@ -21,7 +21,7 @@ async fn get_sprite_png( .body(sheet.encode_png().map_err(map_internal_error)?)) } -#[route("/sprite/sdf/{source_ids}.png", method = "GET", method = "HEAD")] +#[route("/sdf_sprite/{source_ids}.png", method = "GET", method = "HEAD")] async fn get_sprite_sdf_png( path: Path, sprites: Data, @@ -47,7 +47,7 @@ async fn get_sprite_json( } #[route( - "/sprite/sdf/{source_ids}.json", + "/sdf_sprite/{source_ids}.json", method = "GET", method = "HEAD", wrap = "middleware::Compress::default()"