Make /api/v1/accounts/{account_id}/follow work with form-data
This commit is contained in:
parent
27f048c3d2
commit
d22408a4bf
2 changed files with 7 additions and 2 deletions
|
@ -13,6 +13,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
- Changed `reset-subscriptions` command arguments (removes subscription options by default).
|
||||
- Return error if specified Monero account doesn't exist.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Make `/api/v1/accounts/{account_id}/follow` work with form-data.
|
||||
|
||||
## [1.21.0] - 2023-04-12
|
||||
|
||||
### Added
|
||||
|
|
|
@ -76,7 +76,7 @@ use crate::ethereum::{
|
|||
gate::is_allowed_user,
|
||||
identity::verify_eip191_signature,
|
||||
};
|
||||
use crate::http::get_request_base_url;
|
||||
use crate::http::{get_request_base_url, FormOrJson};
|
||||
use crate::identity::{
|
||||
claims::create_identity_claim,
|
||||
minisign::{
|
||||
|
@ -605,8 +605,9 @@ async fn follow_account(
|
|||
config: web::Data<Config>,
|
||||
db_pool: web::Data<DbPool>,
|
||||
account_id: web::Path<Uuid>,
|
||||
follow_data: web::Json<FollowData>,
|
||||
follow_data: FormOrJson<FollowData>,
|
||||
) -> Result<HttpResponse, MastodonError> {
|
||||
let follow_data = follow_data.into_inner();
|
||||
let db_client = &mut **get_database_client(&db_pool).await?;
|
||||
let current_user = get_current_user(db_client, auth.token()).await?;
|
||||
let target = get_profile_by_id(db_client, &account_id).await?;
|
||||
|
|
Loading…
Reference in a new issue