Blog comment comments
This commit is contained in:
parent
02c4d05a84
commit
1bde106195
10 changed files with 39 additions and 117 deletions
|
|
@ -228,7 +228,8 @@ namespace Yavsc.Controllers
|
|||
[ValidateAntiForgeryToken]
|
||||
public IActionResult DeleteConfirmed(long id)
|
||||
{
|
||||
BlogPost blog = _context.Blogspot.Single(m => m.Id == id && m.GetOwnerId()== User.GetUserId());
|
||||
var uid = User.GetUserId();
|
||||
BlogPost blog = _context.Blogspot.Single(m => m.Id == id && m.AuthorId == uid );
|
||||
|
||||
_context.Blogspot.Remove(blog);
|
||||
_context.SaveChanges(User.GetUserId());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue