예제 #1
0
        public async Task <ActionResult> AddRoomObject([FromBody] AddRoomObjectRequest model)
        {
            if (!ModelState.IsValid)
            {
                return(HttpBadRequest());
            }

            var roomId = await _roomService.AddRoomObject(model);

            Response.Headers["Location"] = string.Format("/api/roomobject/{0}", roomId);
            return(new HttpStatusCodeResult((int)HttpStatusCode.Created));
        }