pinakes-server: add utoipa annotations to all routes; fix tests
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I28cf5b7b7cff8e90e123d624d97cf9656a6a6964
This commit is contained in:
parent
8bde7f8fc2
commit
625077f341
60 changed files with 3493 additions and 242 deletions
|
|
@ -11,6 +11,18 @@ use crate::{error::ApiError, state::AppState};
|
|||
///
|
||||
/// For `SQLite`: creates a backup via VACUUM INTO and returns the file.
|
||||
/// For `PostgreSQL`: returns unsupported error (use `pg_dump` instead).
|
||||
#[utoipa::path(
|
||||
post,
|
||||
path = "/api/v1/admin/backup",
|
||||
tag = "backup",
|
||||
responses(
|
||||
(status = 200, description = "Backup file download"),
|
||||
(status = 401, description = "Unauthorized"),
|
||||
(status = 403, description = "Forbidden"),
|
||||
(status = 500, description = "Internal server error"),
|
||||
),
|
||||
security(("bearer_auth" = []))
|
||||
)]
|
||||
pub async fn create_backup(
|
||||
State(state): State<AppState>,
|
||||
) -> Result<Response, ApiError> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue