fix(routes): axum changed placeholders syntax

This commit is contained in:
əlemi 2025-01-09 19:27:38 +01:00
parent caf0ae5ab0
commit 5703c02eef
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -25,7 +25,7 @@ impl ActivityPubRouter for Router<upub::Context> {
// fetch route, to debug and retreive remote objects // fetch route, to debug and retreive remote objects
.route("/search", get(ap::application::search)) .route("/search", get(ap::application::search))
.route("/fetch", get(ap::application::ap_fetch)) .route("/fetch", get(ap::application::ap_fetch))
.route("/proxy/:hmac/:uri", get(ap::application::cloak_proxy)) .route("/proxy/{hmac}/{uri}", get(ap::application::cloak_proxy))
.route("/inbox", post(ap::inbox::post)) .route("/inbox", post(ap::inbox::post))
.route("/inbox", get(ap::inbox::get)) .route("/inbox", get(ap::inbox::get))
.route("/inbox/page", get(ap::inbox::page)) .route("/inbox/page", get(ap::inbox::page))
@ -42,43 +42,43 @@ impl ActivityPubRouter for Router<upub::Context> {
.route("/.well-known/host-meta", get(ap::well_known::host_meta)) .route("/.well-known/host-meta", get(ap::well_known::host_meta))
.route("/.well-known/nodeinfo", get(ap::well_known::nodeinfo_discovery)) .route("/.well-known/nodeinfo", get(ap::well_known::nodeinfo_discovery))
.route("/.well-known/oauth-authorization-server", get(ap::well_known::oauth_authorization_server)) .route("/.well-known/oauth-authorization-server", get(ap::well_known::oauth_authorization_server))
.route("/nodeinfo/:version", get(ap::well_known::nodeinfo)) .route("/nodeinfo/{version}", get(ap::well_known::nodeinfo))
// actor routes // actor routes
.route("/actors/:id", get(ap::actor::view)) .route("/actors/{id}", get(ap::actor::view))
.route("/actors/:id/inbox", post(ap::actor::inbox::post)) .route("/actors/{id}/inbox", post(ap::actor::inbox::post))
.route("/actors/:id/inbox", get(ap::actor::inbox::get)) .route("/actors/{id}/inbox", get(ap::actor::inbox::get))
.route("/actors/:id/inbox/page", get(ap::actor::inbox::page)) .route("/actors/{id}/inbox/page", get(ap::actor::inbox::page))
.route("/actors/:id/outbox", post(ap::actor::outbox::post)) .route("/actors/{id}/outbox", post(ap::actor::outbox::post))
.route("/actors/:id/outbox", get(ap::actor::outbox::get)) .route("/actors/{id}/outbox", get(ap::actor::outbox::get))
.route("/actors/:id/outbox/page", get(ap::actor::outbox::page)) .route("/actors/{id}/outbox/page", get(ap::actor::outbox::page))
.route("/actors/:id/notifications", get(ap::actor::notifications::get)) .route("/actors/{id}/notifications", get(ap::actor::notifications::get))
.route("/actors/:id/notifications/page", get(ap::actor::notifications::page)) .route("/actors/{id}/notifications/page", get(ap::actor::notifications::page))
.route("/actors/:id/followers", get(ap::actor::following::get::<false>)) .route("/actors/{id}/followers", get(ap::actor::following::get::<false>))
.route("/actors/:id/followers/page", get(ap::actor::following::page::<false>)) .route("/actors/{id}/followers/page", get(ap::actor::following::page::<false>))
.route("/actors/:id/following", get(ap::actor::following::get::<true>)) .route("/actors/{id}/following", get(ap::actor::following::get::<true>))
.route("/actors/:id/following/page", get(ap::actor::following::page::<true>)) .route("/actors/{id}/following/page", get(ap::actor::following::page::<true>))
.route("/actors/:id/likes", get(ap::actor::likes::get)) .route("/actors/{id}/likes", get(ap::actor::likes::get))
.route("/actors/:id/likes/page", get(ap::actor::likes::page)) .route("/actors/{id}/likes/page", get(ap::actor::likes::page))
// .route("/actors/:id/audience", get(ap::actor::audience::get)) // .route("/actors/{id}/audience", get(ap::actor::audience::get))
// .route("/actors/:id/audience/page", get(ap::actor::audience::page)) // .route("/actors/{id}/audience/page", get(ap::actor::audience::page))
// activities // activities
.route("/activities/:id", get(ap::activity::view)) .route("/activities/{id}", get(ap::activity::view))
// hashtags // hashtags
.route("/tags/:id", get(ap::tags::get)) .route("/tags/{id}", get(ap::tags::get))
.route("/tags/:id/page", get(ap::tags::page)) .route("/tags/{id}/page", get(ap::tags::page))
// specific object routes // specific object routes
.route("/objects/:id", get(ap::object::view)) .route("/objects/{id}", get(ap::object::view))
.route("/objects/:id/replies", get(ap::object::replies::get)) .route("/objects/{id}/replies", get(ap::object::replies::get))
.route("/objects/:id/replies/page", get(ap::object::replies::page)) .route("/objects/{id}/replies/page", get(ap::object::replies::page))
.route("/objects/:id/context", get(ap::object::context::get)) .route("/objects/{id}/context", get(ap::object::context::get))
.route("/objects/:id/context/page", get(ap::object::context::page)) .route("/objects/{id}/context/page", get(ap::object::context::page))
// file routes // file routes
.route("/file", post(ap::file::upload)) .route("/file", post(ap::file::upload))
.route("/file/:id", get(ap::file::download)) .route("/file/{id}", get(ap::file::download))
//.route("/objects/:id/likes", get(ap::object::likes::get)) //.route("/objects/{id}/likes", get(ap::object::likes::get))
//.route("/objects/:id/likes/page", get(ap::object::likes::page)) //.route("/objects/{id}/likes/page", get(ap::object::likes::page))
//.route("/objects/:id/shares", get(ap::object::announces::get)) //.route("/objects/{id}/shares", get(ap::object::announces::get))
//.route("/objects/:id/shares/page", get(ap::object::announces::page)) //.route("/objects/{id}/shares/page", get(ap::object::announces::page))
} }
} }