Esempio n. 1
0
        public IHttpActionResult CreateMessageInTopic(int idUser, int idTopic,
                                                      string text)
        {
            MessageDTO message = new MessageDTO
            {
                Author     = userService.GetById(idUser),
                Text       = text,
                PostDate   = DateTime.Now,
                IsDeleted  = false,
                Complaints = new List <ComplaintDTO>()
            };

            messageService.AddToTopic(idTopic, message);
            return(Ok(message));
        }