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

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

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