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 }
|
fn default_page_size() -> i64 { 20 }
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize)]
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
use actix_web::{get, post, patch, web, HttpResponse, Scope};
|
use actix_web::{get, post, patch, web, HttpResponse, Scope};
|
||||||
use actix_web_httpauth::extractors::bearer::BearerAuth;
|
use actix_web_httpauth::extractors::bearer::BearerAuth;
|
||||||
use serde::Deserialize;
|
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
||||||
use crate::activitypub::activity::{
|
use crate::activitypub::activity::{
|
||||||
|
@ -53,6 +52,7 @@ use super::types::{
|
||||||
AccountCreateData,
|
AccountCreateData,
|
||||||
AccountUpdateData,
|
AccountUpdateData,
|
||||||
FollowListQueryParams,
|
FollowListQueryParams,
|
||||||
|
RelationshipQueryParams,
|
||||||
StatusListQueryParams,
|
StatusListQueryParams,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -227,14 +227,6 @@ async fn authorize_subscription(
|
||||||
Ok(HttpResponse::Ok().json(signature))
|
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")]
|
#[get("/relationships")]
|
||||||
async fn get_relationships_view(
|
async fn get_relationships_view(
|
||||||
auth: BearerAuth,
|
auth: BearerAuth,
|
||||||
|
|
Loading…
Reference in a new issue