mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
Added a new API method to delete issue comments
This commit is contained in:
parent
63a1d41597
commit
6891696e0d
1 changed files with 12 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue