diff --git a/src/ids.rs b/src/ids.rs index 4d69285..9abda78 100644 --- a/src/ids.rs +++ b/src/ids.rs @@ -42,6 +42,7 @@ pub fn id_db_to_public(id: i32) -> String { /// A cleaner way to handle on-the-fly in-URL parameter format validation for IDs /// TODO: check and remove all other usages +#[derive(UriDisplayPath)] pub struct PublicId(pub i32); impl<'a> FromParam<'a> for PublicId { @@ -56,14 +57,6 @@ impl<'a> FromParam<'a> for PublicId { } } -impl FromUriParam for PublicId { - type Target = PublicId; - - fn from_uri_param(param: T) -> Self::Target { - todo!() - } -} - impl Into for PublicId { fn into(self) -> i32 { self.0 diff --git a/src/routes/admin.rs b/src/routes/admin.rs index 4e6d6e7..36eabf5 100644 --- a/src/routes/admin.rs +++ b/src/routes/admin.rs @@ -157,6 +157,10 @@ pub async fn handle_in_page_forms( #[get("/tag-handover//")] pub async fn show_confirm_tag_handover(id: PublicId, username: &str) -> &'static str { println!("woof id: {}, username: {}", id.0, username); + println!( + "woof generated url: {}", + uri!("/admin", show_confirm_tag_handover(id, username)) + ); "blep" }