private async Task <dynamic> GetConfigs(dynamic parameters, CancellationToken token) { var configurationKeys = await _configStoreService .GetConfigurationKeys() .ConfigureAwait(false); var mappedKeys = Mapper .Map <IEnumerable <ConfigurationKey>, IEnumerable <ConfigKeyListItem> >(configurationKeys); return(Negotiate .WithStatusCode(HttpStatusCode.OK) .WithAllowedMediaRange(JsonMediaRange) .WithModel(mappedKeys)); }
private async Task <dynamic> GetConfigurationList(dynamic parameters, CancellationToken token) { var configKeys = await _service .GetConfigurationKeys() .ConfigureAwait(false); var orderedConfigKeys = configKeys; return(Negotiate .WithModel(new ConfigurationListViewModel { ConfigKeys = Mapper .Map <IEnumerable <ConfigurationKey>, IEnumerable <ConfigKeyListItem> >(orderedConfigKeys) }) .WithView("ConfigurationList")); }