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);
|
if (System.IO.File.Exists(fullPath)) System.IO.File.Delete(fullPath);
|
||||||
await fileService.Delete(post.File);
|
await fileService.Delete(post.File);
|
||||||
|
|
||||||
var deleted = await postService.Delete(post);
|
//var deleted = await postService.Delete(post);
|
||||||
if (!deleted) return NotFound();
|
//if (!deleted) return NotFound();
|
||||||
return NoContent();
|
return NoContent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user