add the searches route and fix a few broken things

This commit is contained in:
Tamo 2024-12-23 15:58:52 +01:00
parent 78f6f22a80
commit 04e4586fb3
No known key found for this signature in database
GPG key ID: 20CD8020AFA88D69
8 changed files with 196 additions and 43 deletions

View file

@ -16,7 +16,7 @@ use time::OffsetDateTime;
use utoipa::{IntoParams, OpenApi, ToSchema};
use uuid::Uuid;
use super::PAGINATION_DEFAULT_LIMIT;
use super::{PAGINATION_DEFAULT_LIMIT, PAGINATION_DEFAULT_LIMIT_FN};
use crate::extractors::authentication::policies::*;
use crate::extractors::authentication::GuardedData;
use crate::extractors::sequential_extractor::SeqHandler;
@ -116,11 +116,11 @@ pub async fn create_api_key(
#[deserr(error = DeserrQueryParamError, rename_all = camelCase, deny_unknown_fields)]
#[into_params(rename_all = "camelCase", parameter_in = Query)]
pub struct ListApiKeys {
#[into_params(value_type = usize, default = 0)]
#[deserr(default, error = DeserrQueryParamError<InvalidApiKeyOffset>)]
#[param(value_type = usize, default = 0)]
pub offset: Param<usize>,
#[into_params(value_type = usize, default = PAGINATION_DEFAULT_LIMIT)]
#[deserr(default = Param(PAGINATION_DEFAULT_LIMIT), error = DeserrQueryParamError<InvalidApiKeyLimit>)]
#[param(value_type = usize, default = PAGINATION_DEFAULT_LIMIT_FN)]
pub limit: Param<usize>,
}