Exemplo n.º 1
0
        public async Task <IActionResult> GetValueAsync(NameDto nameDto)
        {
            if (!ModelState.IsValid)
            {
                return(this.ValidationError());
            }
            Application        app  = this.GetApplication();
            ApplicationService serv = this.GetService();
            ServiceEnvironment env  = this.GetEnvironment();

            try {
                return(Json(await _client.GetConfigValueAsync(app.Key, serv.Key, env.Key, nameDto.Name)));
            } catch (KeyVaultErrorException) {
                return(Json(ErrorDto.Create(ErrorCodes.ConfigNameNotFound)));
            }
        }