diff --git a/upub/routes/src/activitypub/mod.rs b/upub/routes/src/activitypub/mod.rs index e556620..2f72e4a 100644 --- a/upub/routes/src/activitypub/mod.rs +++ b/upub/routes/src/activitypub/mod.rs @@ -25,7 +25,7 @@ impl ActivityPubRouter for Router { // fetch route, to debug and retreive remote objects .route("/search", get(ap::application::search)) .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", get(ap::inbox::get)) .route("/inbox/page", get(ap::inbox::page)) @@ -42,43 +42,43 @@ impl ActivityPubRouter for Router { .route("/.well-known/host-meta", get(ap::well_known::host_meta)) .route("/.well-known/nodeinfo", get(ap::well_known::nodeinfo_discovery)) .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 - .route("/actors/:id", get(ap::actor::view)) - .route("/actors/:id/inbox", post(ap::actor::inbox::post)) - .route("/actors/:id/inbox", get(ap::actor::inbox::get)) - .route("/actors/:id/inbox/page", get(ap::actor::inbox::page)) - .route("/actors/:id/outbox", post(ap::actor::outbox::post)) - .route("/actors/:id/outbox", get(ap::actor::outbox::get)) - .route("/actors/:id/outbox/page", get(ap::actor::outbox::page)) - .route("/actors/:id/notifications", get(ap::actor::notifications::get)) - .route("/actors/:id/notifications/page", get(ap::actor::notifications::page)) - .route("/actors/:id/followers", get(ap::actor::following::get::)) - .route("/actors/:id/followers/page", get(ap::actor::following::page::)) - .route("/actors/:id/following", get(ap::actor::following::get::)) - .route("/actors/:id/following/page", get(ap::actor::following::page::)) - .route("/actors/:id/likes", get(ap::actor::likes::get)) - .route("/actors/:id/likes/page", get(ap::actor::likes::page)) - // .route("/actors/:id/audience", get(ap::actor::audience::get)) - // .route("/actors/:id/audience/page", get(ap::actor::audience::page)) + .route("/actors/{id}", get(ap::actor::view)) + .route("/actors/{id}/inbox", post(ap::actor::inbox::post)) + .route("/actors/{id}/inbox", get(ap::actor::inbox::get)) + .route("/actors/{id}/inbox/page", get(ap::actor::inbox::page)) + .route("/actors/{id}/outbox", post(ap::actor::outbox::post)) + .route("/actors/{id}/outbox", get(ap::actor::outbox::get)) + .route("/actors/{id}/outbox/page", get(ap::actor::outbox::page)) + .route("/actors/{id}/notifications", get(ap::actor::notifications::get)) + .route("/actors/{id}/notifications/page", get(ap::actor::notifications::page)) + .route("/actors/{id}/followers", get(ap::actor::following::get::)) + .route("/actors/{id}/followers/page", get(ap::actor::following::page::)) + .route("/actors/{id}/following", get(ap::actor::following::get::)) + .route("/actors/{id}/following/page", get(ap::actor::following::page::)) + .route("/actors/{id}/likes", get(ap::actor::likes::get)) + .route("/actors/{id}/likes/page", get(ap::actor::likes::page)) + // .route("/actors/{id}/audience", get(ap::actor::audience::get)) + // .route("/actors/{id}/audience/page", get(ap::actor::audience::page)) // activities - .route("/activities/:id", get(ap::activity::view)) + .route("/activities/{id}", get(ap::activity::view)) // hashtags - .route("/tags/:id", get(ap::tags::get)) - .route("/tags/:id/page", get(ap::tags::page)) + .route("/tags/{id}", get(ap::tags::get)) + .route("/tags/{id}/page", get(ap::tags::page)) // specific object routes - .route("/objects/:id", get(ap::object::view)) - .route("/objects/:id/replies", get(ap::object::replies::get)) - .route("/objects/:id/replies/page", get(ap::object::replies::page)) - .route("/objects/:id/context", get(ap::object::context::get)) - .route("/objects/:id/context/page", get(ap::object::context::page)) + .route("/objects/{id}", get(ap::object::view)) + .route("/objects/{id}/replies", get(ap::object::replies::get)) + .route("/objects/{id}/replies/page", get(ap::object::replies::page)) + .route("/objects/{id}/context", get(ap::object::context::get)) + .route("/objects/{id}/context/page", get(ap::object::context::page)) // file routes .route("/file", post(ap::file::upload)) - .route("/file/:id", get(ap::file::download)) - //.route("/objects/:id/likes", get(ap::object::likes::get)) - //.route("/objects/:id/likes/page", get(ap::object::likes::page)) - //.route("/objects/:id/shares", get(ap::object::announces::get)) - //.route("/objects/:id/shares/page", get(ap::object::announces::page)) + .route("/file/{id}", get(ap::file::download)) + //.route("/objects/{id}/likes", get(ap::object::likes::get)) + //.route("/objects/{id}/likes/page", get(ap::object::likes::page)) + //.route("/objects/{id}/shares", get(ap::object::announces::get)) + //.route("/objects/{id}/shares/page", get(ap::object::announces::page)) } }