public IActionResult Post([FromBody] RoomApi room) { try { new RoomDao(_unitOfWork, _mapper).Create(room); return(Ok()); } catch (Exception e) { Console.WriteLine(e); return(NotFound()); } }
public MatrixApi(Uri url) { if (url != null && url.IsWellFormedOriginalString() && !url.IsAbsoluteUri) { throw new MatrixException(Resources.InvalidUrl); } _isAppservice = false; Backend = new HttpBackend(url, UserId); BaseUrl = url; Rng = new Random(DateTime.Now.Millisecond); Room = new RoomApi(this); LoginEndpoint = new LoginEndpoint(this); VersionsEndpoint = new VersionsEndpoint(this); Device = new DeviceApi(this); Media = new MediaApi(this); Profile = new ProfileApi(this); Sync = new SyncEndpoint(this); RoomDirectory = new RoomDirectoryApi(this); }