fix: return Unauthorized() instead of Forbid() in UpdateTicketComment

This commit is contained in:
Yinyin Liu 2026-04-22 11:13:33 +02:00
parent aa23ddb781
commit ca65ce19d8
1 changed files with 2 additions and 2 deletions

View File

@ -2413,8 +2413,8 @@ public class Controller : ControllerBase
var comment = Db.TicketComments.FirstOrDefault(c => c.Id == req.Id);
if (comment is null) return NotFound();
if (comment.AuthorType != (Int32)CommentAuthorType.Human) return Forbid();
if (comment.AuthorId != user.Id) return Forbid();
if (comment.AuthorType != (Int32)CommentAuthorType.Human) return Unauthorized();
if (comment.AuthorId != user.Id) return Unauthorized();
if (String.IsNullOrWhiteSpace(req.Body)) return BadRequest("Body required.");