|
|
@ -1119,7 +1119,7 @@ func DeleteComment(ctx *context.Context) { |
|
|
|
if !ctx.IsSigned || (ctx.User.ID != comment.PosterID && !ctx.Repo.IsAdmin()) { |
|
|
|
if !ctx.IsSigned || (ctx.User.ID != comment.PosterID && !ctx.Repo.IsAdmin()) { |
|
|
|
ctx.Error(403) |
|
|
|
ctx.Error(403) |
|
|
|
return |
|
|
|
return |
|
|
|
} else if comment.Type != models.CommentTypeComment { |
|
|
|
} else if comment.Type != models.CommentTypeComment && comment.Type != models.CommentTypeCode { |
|
|
|
ctx.Error(204) |
|
|
|
ctx.Error(204) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|