Fix post deletion is cascading so no need to delete post after deleting file
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user