Пример #1
0
        public ActionResult CreateChatroom(CreateChatroomRequestModel request)
        {
            var response = new CreateChatroomResponseModel()
            {
                ChatroomName     = request.ChatroomName,
                ParentChatroomId = request.ParentChatroomId,
                UserId           = request.User.Id
            };

            response.ChatroomId = request.ChatroomName.GetHashCode(); //TODO temporary until DB is linked up

            var errors = ChatroomService.CreatePrivateChatroom(request);

            response.Errors.AddRange(errors);

            return(Json(response));
        }