Fix post deletion is cascading so no need to delete post after deleting file

This commit is contained in:
2025-10-08 10:01:36 +03:00
parent 1b24f67983
commit 96a5e764c2

View File

@@ -361,8 +361,8 @@ public class PostController(
if (System.IO.File.Exists(fullPath)) System.IO.File.Delete(fullPath);
await fileService.Delete(post.File);
var deleted = await postService.Delete(post);
if (!deleted) return NotFound();
//var deleted = await postService.Delete(post);
//if (!deleted) return NotFound();
return NoContent();
}