From 7511832fa0e32cc61603047d33c218d5417e8a4b Mon Sep 17 00:00:00 2001 From: silverpill Date: Sat, 26 Nov 2022 21:13:37 +0000 Subject: [PATCH] Rename /signed_update API method to /send_activity --- docs/openapi.yaml | 1 + src/mastodon_api/accounts/views.rs | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/openapi.yaml b/docs/openapi.yaml index e325643..b704256 100644 --- a/docs/openapi.yaml +++ b/docs/openapi.yaml @@ -175,6 +175,7 @@ paths: description: Canonical representation of activity. type: string example: '{"type":"Update"}' + /api/v1/accounts/send_activity: post: summary: Send signed activity (experimental). requestBody: diff --git a/src/mastodon_api/accounts/views.rs b/src/mastodon_api/accounts/views.rs index 6434644..b885141 100644 --- a/src/mastodon_api/accounts/views.rs +++ b/src/mastodon_api/accounts/views.rs @@ -254,8 +254,8 @@ async fn get_unsigned_update( Ok(HttpResponse::Ok().json(data)) } -#[post("/signed_update")] -async fn send_signed_update( +#[post("/send_activity")] +async fn send_signed_activity( auth: BearerAuth, config: web::Data, db_pool: web::Data, @@ -707,7 +707,7 @@ pub fn account_api_scope() -> Scope { .service(verify_credentials) .service(update_credentials) .service(get_unsigned_update) - .service(send_signed_update) + .service(send_signed_activity) .service(get_identity_claim) .service(create_identity_proof) .service(get_relationships_view)