feat(openapi): add new entry used by drag & drop

This commit is contained in:
Edouard Vanbelle
2026-05-04 22:41:29 +02:00
parent 05037e7491
commit 0cb641ab20
2 changed files with 17 additions and 1 deletions
@@ -852,6 +852,21 @@ pub async fn move_folders_batch(
}
// Hander as a workarround for drag & drop (does not support POST requests)
#[utoipa::path(
get,
path = "/api/batch/download",
params(
("file_ids" = Option<String>, Query, description = "Comma-separated file IDs"),
("folder_ids" = Option<String>, Query, description = "Comma-separated folder IDs"),
),
responses(
(status = 200, description = "ZIP archive stream"),
(status = 400, description = "Bad request"),
(status = 401, description = "Unauthorized"),
(status = 500, description = "ZIP creation failed")
),
tag = "batch"
)]
pub async fn download_batch_querystring(
State(state): State<BatchHandlerState>,
auth_user: AuthUser,
+2 -1
View File
@@ -131,7 +131,8 @@ use crate::interfaces::api::handlers::file_handler::MoveFilePayload;
handlers::batch_handler::get_folders_batch,
handlers::batch_handler::move_folders_batch,
handlers::batch_handler::trash_batch,
handlers::batch_handler::download_batch,
handlers::batch_handler::download_batch_post,
handlers::batch_handler::download_batch_querystring,
// Music/playlist handlers (free functions)
handlers::music_handler::create_playlist,
handlers::music_handler::list_playlists,