Пример #1
0
        public async Task <HttpResponseMessage> Post(string id, ExternalVideoModel model)
        {
            // Get project entity
            await GetProjectAsync(id);

            DomainExternalVideo externalVideo = await _externalVideoService.AddAsync(id, model);

            var result = new ExternalVideo
            {
                ProductName  = externalVideo.ProductName,
                VideoUri     = externalVideo.VideoUri,
                AcsNamespace = _settings.AcsNamespace
            };

            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.Created, result);

            return(response);
        }
Пример #2
0
 // PUT api/projects/{id}/external
 public HttpResponseMessage Put(string id, ExternalVideoModel model)
 {
     return(Request.CreateErrorResponse(HttpStatusCode.MethodNotAllowed, ResponseMessages.MethodNotAllowed));
 }