From d3044304c1543b4df899a0eb1d4edf21b0ed3a61 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sun, 2 Jul 2023 13:08:31 -0500 Subject: tweak --- src/slskd/Files/API/FilesController.cs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/slskd/Files/API/FilesController.cs') diff --git a/src/slskd/Files/API/FilesController.cs b/src/slskd/Files/API/FilesController.cs index 12c642c0..2bb2d051 100644 --- a/src/slskd/Files/API/FilesController.cs +++ b/src/slskd/Files/API/FilesController.cs @@ -95,24 +95,24 @@ namespace slskd.Files.API /// The specified subdirectory does not exist. [HttpDelete("downloads/directories/{base64SubdirectoryName}")] [Authorize(Policy = AuthPolicy.Any)] - [ProducesResponseType(typeof(Dictionary>), 204)] + [ProducesResponseType(204)] public Task DeleteDownloadSubdirectoryAsync([FromRoute] string base64SubdirectoryName) => DeleteSubdirectoryAsync(rootDirectory: OptionsSnapshot.Value.Directories.Downloads, base64SubdirectoryName); /// /// Deletes the specified file within the downloads directory. /// - /// The relative, base 64 encoded, name of the file to delete. + /// The relative, base 64 encoded, name of the file to delete. /// /// The request completed successfully. /// Authentication failed. /// Access to the specified subdirectory was denied. /// The specified subdirectory does not exist. - [HttpDelete("downloads/files/{base64Filename}")] + [HttpDelete("downloads/files/{base64FileName}")] [Authorize(Policy = AuthPolicy.Any)] - [ProducesResponseType(typeof(Dictionary>), 204)] - public Task DeleteDownloadFileAsync([FromRoute] string base64filename) - => DeleteFileAsync(rootDirectory: OptionsSnapshot.Value.Directories.Downloads, base64filename); + [ProducesResponseType(204)] + public Task DeleteDownloadFileAsync([FromRoute] string base64FileName) + => DeleteFileAsync(rootDirectory: OptionsSnapshot.Value.Directories.Downloads, base64FileName); /// /// Lists the contents of the downloads directory. @@ -154,24 +154,24 @@ namespace slskd.Files.API /// The specified subdirectory does not exist. [HttpDelete("incomplete/directories/{base64SubdirectoryName}")] [Authorize(Policy = AuthPolicy.Any)] - [ProducesResponseType(typeof(Dictionary>), 204)] + [ProducesResponseType(204)] public Task DeleteIncompleteSubdirectoryAsync([FromRoute] string base64SubdirectoryName) => DeleteSubdirectoryAsync(rootDirectory: OptionsSnapshot.Value.Directories.Incomplete, base64SubdirectoryName); /// /// Deletes the specified file within the downloads directory. /// - /// The relative, base 64 encoded, name of the file to delete. + /// The relative, base 64 encoded, name of the file to delete. /// /// The request completed successfully. /// Authentication failed. /// Access to the specified subdirectory was denied. /// The specified subdirectory does not exist. - [HttpDelete("incomplete/files/{base64Filename}")] + [HttpDelete("incomplete/files/{base64FileName}")] [Authorize(Policy = AuthPolicy.Any)] [ProducesResponseType(204)] - public Task DeleteIncompleteFileAsync([FromRoute] string base64filename) - => DeleteFileAsync(rootDirectory: OptionsSnapshot.Value.Directories.Incomplete, base64filename); + public Task DeleteIncompleteFileAsync([FromRoute] string base64FileName) + => DeleteFileAsync(rootDirectory: OptionsSnapshot.Value.Directories.Incomplete, base64FileName); private async Task ListDirectoryAsync(string rootDirectory, string base64SubdirectoryName = null, bool recursive = false) { @@ -244,14 +244,14 @@ namespace slskd.Files.API } } - private async Task DeleteFileAsync(string rootDirectory, string base64Filename) + private async Task DeleteFileAsync(string rootDirectory, string base64FileName) { if (!OptionsSnapshot.Value.RemoteFileManagement) { return Forbid(); } - var requestedFilename = base64Filename + var requestedFilename = base64FileName .FromBase64() .Replace('\\', Path.DirectorySeparatorChar) .Replace('/', Path.DirectorySeparatorChar); -- cgit v1.2.3