Required the API token for every runtime API route (#1045)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-10-11 10:07:07 +02:00
1 parent 4f966eed86
commit 8badadb35f
24 files changed
+231 -79

No files matched your search

+1 -2
View File
@@ -2,7 +2,6 @@ use axum::Json;
use log::{error, info};
use serde::{Deserialize, Serialize};
use std::path::{Path, PathBuf};
use crate::api_token::APIToken;
/// The directory the app creates its shareable plugin archives in. Keep in sync with
/// PluginShareService.TEMPORARY_ARCHIVE_DIRECTORY on the .NET side.
@@ -23,7 +22,7 @@ pub struct ShareFileResponse {
issue: String,
}
pub async fn share_file(_token: APIToken, Json(request): Json<ShareFileRequest>) -> Json<ShareFileResponse> {
pub async fn share_file(Json(request): Json<ShareFileRequest>) -> Json<ShareFileResponse> {
let path = PathBuf::from(request.file_path.trim());
if path.as_os_str().is_empty() {
return failure("The file path is empty.");