示例#1
0
        public void DeleteMessages(int id, [FromUri] int[] messageId)
        {
            if (id != permissionContext.LoggedUserId)
            {
                throw new HttpForbiddenException();
            }

            messageQueries.Delete(messageId);
        }
示例#2
0
        public IActionResult DeleteMessages(int id, [FromQuery] int[] messageId)
        {
            if (id != _permissionContext.LoggedUserId)
            {
                return(Forbid());
            }

            _messageQueries.Delete(messageId);
            return(NoContent());
        }
示例#3
0
 public void DeleteMessage(int messageId)
 {
     messageQueries.Delete(messageId);
 }