Beispiel #1
0
 public async Task <IActionResult> Update(
     [HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = "resources/{resourceId:guid}")] ResourceViewModel resource,
     HttpRequest req,
     Guid resourceId, CancellationToken cancellationToken)
 {
     return(await _service.Update(resource, req, resourceId, cancellationToken));
 }
Beispiel #2
0
        public async Task <IActionResult> Update(
            [HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = "resources/{resourceId}")] string resourceJson, //ResourceViewModel resource,
            HttpRequest req,
            string resourceId, CancellationToken cancellationToken)
        {
            var resource = JsonConvert.DeserializeObject <ResourceViewModel>(resourceJson);

            return(await _service.Update(resource, req, Guid.Parse(resourceId), cancellationToken));
        }