🐛 Try to fix the soft delete filter didn't work in drive

This commit is contained in:
2025-11-17 23:19:03 +08:00
parent a172128d84
commit 4280168002
5 changed files with 38 additions and 24 deletions

View File

@@ -306,7 +306,7 @@ public class FileController(
[Authorize]
[HttpDelete("{id}")]
public async Task<ActionResult> DeleteFile(string id)
public async Task<ActionResult<SnCloudFile>> DeleteFile(string id)
{
if (HttpContext.Items["CurrentUser"] is not Account currentUser) return Unauthorized();
var userId = Guid.Parse(currentUser.Id);
@@ -318,9 +318,9 @@ public class FileController(
if (file is null) return NotFound();
await fs.DeleteFileDataAsync(file, force: true);
await fs.DeleteFileAsync(file);
await fs.DeleteFileAsync(file, skipData: true);
return NoContent();
return Ok(file);
}
[Authorize]