public void DeleteMessages(int id, [FromUri] int[] messageId) { if (id != permissionContext.LoggedUserId) { throw new HttpForbiddenException(); } messageQueries.Delete(messageId); }
public IActionResult DeleteMessages(int id, [FromQuery] int[] messageId) { if (id != _permissionContext.LoggedUserId) { return(Forbid()); } _messageQueries.Delete(messageId); return(NoContent()); }
public void DeleteMessage(int messageId) { messageQueries.Delete(messageId); }