feat: fix activity pub

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
Kasper Juul Hermansen 2024-08-21 22:05:53 +02:00
parent d859db820e
commit cfae922b88
Signed by: kjuulh
GPG Key ID: D85D7535F18F35FA
4 changed files with 969 additions and 66 deletions

1023
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -26,8 +26,8 @@ All URIs are relative to */api/v1*
Class | Method | HTTP request | Description Class | Method | HTTP request | Description
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
*ActivitypubApi* | [**activitypub_person**](docs/ActivitypubApi.md#activitypub_person) | **GET** /activitypub/user-id/{user-id} | Returns the Person actor for a user *ActivitypubApi* | [**activitypub_person**](docs/ActivitypubApi.md#activitypub_person) | **GET** /activitypub/user-id/{user_id} | Returns the Person actor for a user
*ActivitypubApi* | [**activitypub_person_inbox**](docs/ActivitypubApi.md#activitypub_person_inbox) | **POST** /activitypub/user-id/{user-id}/inbox | Send to the inbox *ActivitypubApi* | [**activitypub_person_inbox**](docs/ActivitypubApi.md#activitypub_person_inbox) | **POST** /activitypub/user-id/{user_id}/inbox | Send to the inbox
*AdminApi* | [**admin_add_user_badges**](docs/AdminApi.md#admin_add_user_badges) | **POST** /admin/users/{username}/badges | Add a badge to a user *AdminApi* | [**admin_add_user_badges**](docs/AdminApi.md#admin_add_user_badges) | **POST** /admin/users/{username}/badges | Add a badge to a user
*AdminApi* | [**admin_adopt_repository**](docs/AdminApi.md#admin_adopt_repository) | **POST** /admin/unadopted/{owner}/{repo} | Adopt unadopted files as a repository *AdminApi* | [**admin_adopt_repository**](docs/AdminApi.md#admin_adopt_repository) | **POST** /admin/unadopted/{owner}/{repo} | Adopt unadopted files as a repository
*AdminApi* | [**admin_create_hook**](docs/AdminApi.md#admin_create_hook) | **POST** /admin/hooks | Create a hook *AdminApi* | [**admin_create_hook**](docs/AdminApi.md#admin_create_hook) | **POST** /admin/hooks | Create a hook

View File

@ -4,8 +4,8 @@ All URIs are relative to */api/v1*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**activitypub_person**](ActivitypubApi.md#activitypub_person) | **GET** /activitypub/user-id/{user-id} | Returns the Person actor for a user [**activitypub_person**](ActivitypubApi.md#activitypub_person) | **GET** /activitypub/user-id/{user_id} | Returns the Person actor for a user
[**activitypub_person_inbox**](ActivitypubApi.md#activitypub_person_inbox) | **POST** /activitypub/user-id/{user-id}/inbox | Send to the inbox [**activitypub_person_inbox**](ActivitypubApi.md#activitypub_person_inbox) | **POST** /activitypub/user-id/{user_id}/inbox | Send to the inbox

View File

@ -35,7 +35,7 @@ pub async fn activitypub_person(configuration: &configuration::Configuration, us
let local_var_client = &local_var_configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/activitypub/user-id/{user-id}", local_var_configuration.base_path, user-id=user_id); let local_var_uri_str = format!("{}/activitypub/user-id/{user_id}", local_var_configuration.base_path, user_id=user_id);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_apikey) = local_var_configuration.api_key { if let Some(ref local_var_apikey) = local_var_configuration.api_key {
@ -113,7 +113,7 @@ pub async fn activitypub_person_inbox(configuration: &configuration::Configurati
let local_var_client = &local_var_configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/activitypub/user-id/{user-id}/inbox", local_var_configuration.base_path, user-id=user_id); let local_var_uri_str = format!("{}/activitypub/user-id/{user_id}/inbox", local_var_configuration.base_path, user_id=user_id);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
if let Some(ref local_var_apikey) = local_var_configuration.api_key { if let Some(ref local_var_apikey) = local_var_configuration.api_key {