fix: return Unauthorized() instead of Forbid() in UpdateTicketComment
This commit is contained in:
parent
aa23ddb781
commit
ca65ce19d8
|
|
@ -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.");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue