Added a new API method to delete issue comments

pull/2420/head^2
TidusJar 6 years ago
parent 63a1d41597
commit 6891696e0d

@ -240,6 +240,18 @@ namespace Ombi.Controllers
return await _issueComments.Add(newComment);
}
/// <summary>
/// Deletes a comment on a issue
/// </summary>
[HttpDelete("comments/{id:int}")]
[PowerUser]
public async Task<bool> DeleteComment(int commentId)
{
var comment = await _issueComments.GetAll().FirstOrDefaultAsync(x => x.Id == commentId);
await _issueComments.Delete(comment);
return true;
}
[HttpPost("status")]
public async Task<bool> UpdateStatus([FromBody] IssueStateViewModel model)

Loading…
Cancel
Save