public IActionResult Secrets(int apiResourceId) { LoadCachedModelState(); var secretsResult = m_secretManager.GetSecretsForApiResources(apiResourceId); if (secretsResult.HasError) { ModelState.AddModelError(secretsResult.Error.Message); return(View()); } var secretViewModels = Mapper.Map <IList <SecretViewModel> >(secretsResult.Result); var vm = ViewModelFactory.GetApiResourceSecretsViewModel(secretViewModels, apiResourceId, Translator.Translate("delete-secret-confirm-dialog-title"), Translator.Translate("delete-secret-confirm-dialog-message")); return(View(vm)); }