Move RelationshipQueryParams type to types module
This commit is contained in:
parent
8b4325ad96
commit
c4a1da5349
2 changed files with 9 additions and 9 deletions
|
@ -185,6 +185,14 @@ impl AccountUpdateData {
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: actix currently doesn't support parameter arrays
|
||||
// https://github.com/actix/actix-web/issues/2044
|
||||
#[derive(Deserialize)]
|
||||
pub struct RelationshipQueryParams {
|
||||
#[serde(rename(deserialize = "id[]"))]
|
||||
pub id: Uuid,
|
||||
}
|
||||
|
||||
fn default_page_size() -> i64 { 20 }
|
||||
|
||||
#[derive(Deserialize)]
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
use actix_web::{get, post, patch, web, HttpResponse, Scope};
|
||||
use actix_web_httpauth::extractors::bearer::BearerAuth;
|
||||
use serde::Deserialize;
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::activitypub::activity::{
|
||||
|
@ -53,6 +52,7 @@ use super::types::{
|
|||
AccountCreateData,
|
||||
AccountUpdateData,
|
||||
FollowListQueryParams,
|
||||
RelationshipQueryParams,
|
||||
StatusListQueryParams,
|
||||
};
|
||||
|
||||
|
@ -227,14 +227,6 @@ async fn authorize_subscription(
|
|||
Ok(HttpResponse::Ok().json(signature))
|
||||
}
|
||||
|
||||
// TODO: actix currently doesn't support parameter arrays
|
||||
// https://github.com/actix/actix-web/issues/2044
|
||||
#[derive(Deserialize)]
|
||||
pub struct RelationshipQueryParams {
|
||||
#[serde(rename(deserialize = "id[]"))]
|
||||
id: Uuid,
|
||||
}
|
||||
|
||||
#[get("/relationships")]
|
||||
async fn get_relationships_view(
|
||||
auth: BearerAuth,
|
||||
|
|
Loading…
Reference in a new issue