fix(api): harden billing/blog validation and update rc14 changelog

This commit is contained in:
Paul Schneider 2026-09-06 19:16:41 +01:00
commit ad5e9090ee
13 changed files with 168 additions and 53 deletions

View file

@ -121,6 +121,7 @@ namespace Yavsc.Controllers
public async Task<IActionResult> Create(Comment comment)
{
comment.UserCreated = User.GetUserId();
comment.UserModified = comment.UserCreated;
// AuthorId/UserCreated is set server-side after model binding;
// remove the stale binding error so a valid authenticated POST
// does not fall into the invalid branch.
@ -129,7 +130,7 @@ namespace Yavsc.Controllers
if (ModelState.IsValid)
{
_context.Comment.Add(comment);
await _context.SaveChangesAsync();
await _context.SaveChangesAsync(comment.UserCreated);
return RedirectToAction("Index");
}
ViewBag.ReceiverId = new SelectList(_context.BlogSpot, "Id", "Title", comment.ReceiverId);