public void CreateChatRoom(string useralias, string roomName, string password, int maxUser, bool needPassword) { if (maxUser < 2) { maxUser = 2; } Guid roomid = ChatManager.CreateChatRoom( roomName, password, false, maxUser, needPassword); }
public async Task <IHttpActionResult> CreateRoom(ChatRoomDto room) { try { if (ModelState.IsValid) { return(Ok(await _chatManager.CreateChatRoom(room))); } else { return(BadRequest(ModelState)); } } catch (Exception ex) { return(InternalServerError(ex)); } }