From 1cecfe4b3c8f1fb743bfb20cb1cddd6edb97f7b6 Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Thu, 12 Mar 2026 10:24:24 +0500 Subject: [PATCH] s3: disable bulk deletion (temporarily) --- Notesnook.API/Controllers/S3Controller.cs | 38 +++++++++++------------ 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/Notesnook.API/Controllers/S3Controller.cs b/Notesnook.API/Controllers/S3Controller.cs index a999640..a4435a9 100644 --- a/Notesnook.API/Controllers/S3Controller.cs +++ b/Notesnook.API/Controllers/S3Controller.cs @@ -210,25 +210,25 @@ namespace Notesnook.API.Controllers } } - [HttpPost("bulk-delete")] - public async Task DeleteBulkAsync([FromBody] DeleteBulkObjectsRequest request) - { - try - { - if (request.Names == null || request.Names.Length == 0) - { - return BadRequest(new { error = "No files specified for deletion." }); - } + // [HttpPost("bulk-delete")] + // public async Task DeleteBulkAsync([FromBody] DeleteBulkObjectsRequest request) + // { + // try + // { + // if (request.Names == null || request.Names.Length == 0) + // { + // return BadRequest(new { error = "No files specified for deletion." }); + // } - var userId = this.User.GetUserId(); - await s3Service.DeleteObjectsAsync(userId, request.Names); - return Ok(); - } - catch (Exception ex) - { - logger.LogError(ex, "Error deleting objects for user."); - return BadRequest(new { error = "Failed to delete attachments." }); - } - } + // var userId = this.User.GetUserId(); + // await s3Service.DeleteObjectsAsync(userId, request.Names); + // return Ok(); + // } + // catch (Exception ex) + // { + // logger.LogError(ex, "Error deleting objects for user."); + // return BadRequest(new { error = "Failed to delete attachments." }); + // } + // } } }