public async Task <IActionResult> PatchConfiguration(string id, string configuration) { // patch var(statusCode, _) = repository.Patch(Request.GetAuthentication(), id, configuration); // redirect if (statusCode == HttpStatusCode.NoContent) { return(Redirect($"/api/v3/models/{id}")); } // response return(await this .ErrorResultAsync("Models collection or configuration were not found.", HttpStatusCode.NotFound) .ConfigureAwait(false)); }
public IActionResult PatchConfiguration(string id, string configuration) { // patch var(statusCode, _) = repository.Patch(Request.GetAuthentication(), id, configuration); // redirect if (statusCode == HttpStatusCode.NoContent) { return(Redirect($"/api/v3/models/{id}")); } // response return(new ContentResult { ContentType = MediaTypeNames.Application.Json, StatusCode = statusCode.ToInt32() }); }