public Task <IActionResult> SetCurrentVersion([FromRoute] Guid templateId, [FromBody] Guid templateVersionId, CancellationToken cancellationToken) { return(SafeInvoke(async() => { await _templateManager.SetCurrentVersion(templateId, templateVersionId, cancellationToken); return AcceptedAtRoute("TemplateDetails", new { templateId }, null); }, new Dictionary <Type, Func <IActionResult> >() { { typeof(TemplateNotFoundException), NotFound }, { typeof(TemplateVersionNotFoundException), BadRequest } })); }