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

@ -35,6 +35,7 @@ use self::open_api_utils::OpenApiAuth;
use self::tasks::AllTasks;
const PAGINATION_DEFAULT_LIMIT: usize = 20;
const PAGINATION_DEFAULT_LIMIT_FN: fn() -> usize = || 20;
mod api_key;
pub mod batches;
@ -55,6 +56,8 @@ pub mod tasks;
nest(
(path = "/tasks", api = tasks::TaskApi),
(path = "/indexes", api = indexes::IndexesApi),
// We must stop the search path here because the rest must be configured by each route individually
(path = "/indexes", api = indexes::search::SearchApi),
(path = "/snapshots", api = snapshot::SnapshotApi),
(path = "/dumps", api = dump::DumpApi),
(path = "/keys", api = api_key::ApiKeyApi),