fixes the comment dates
This commit is contained in:
parent
0e49b13965
commit
becd37e6cf
1 changed files with 4 additions and 3 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Security.Claims;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNet.Http;
|
using Microsoft.AspNet.Http;
|
||||||
using Microsoft.AspNet.Mvc;
|
using Microsoft.AspNet.Mvc;
|
||||||
|
|
@ -64,7 +65,7 @@ namespace Yavsc.Controllers
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync(User.GetUserId());
|
||||||
}
|
}
|
||||||
catch (DbUpdateConcurrencyException)
|
catch (DbUpdateConcurrencyException)
|
||||||
{
|
{
|
||||||
|
|
@ -93,7 +94,7 @@ namespace Yavsc.Controllers
|
||||||
_context.Comment.Add(comment);
|
_context.Comment.Add(comment);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync(User.GetUserId());
|
||||||
}
|
}
|
||||||
catch (DbUpdateException)
|
catch (DbUpdateException)
|
||||||
{
|
{
|
||||||
|
|
@ -126,7 +127,7 @@ namespace Yavsc.Controllers
|
||||||
}
|
}
|
||||||
|
|
||||||
_context.Comment.Remove(comment);
|
_context.Comment.Remove(comment);
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync(User.GetUserId());
|
||||||
|
|
||||||
return Ok(comment);
|
return Ok(comment);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue