fix bad geography types for geocoder providers

This commit is contained in:
Sylvain Briat 2024-01-17 15:35:09 +01:00
parent cdf413593b
commit d4ce7b4af1
1 changed files with 5 additions and 3 deletions

View File

@ -12,8 +12,8 @@ export interface GeographyConfig extends Config {
geocoderConsolidate: boolean;
geocoderProximity: number;
geocoderPopulationPrioritizerCoef: number;
geocoderProviders: number[];
geocoderProvidersFallback: string;
geocoderProviders: string[];
geocoderProvidersFallback: string[];
}
export default registerAs('geography', () => ({
@ -49,5 +49,7 @@ export default registerAs('geography', () => ({
geocoderProviders: process.env.GEOCODER_PROVIDERS
? process.env.GEOCODER_PROVIDERS?.split(',')
: ['ADDOK,PELIAS_SEARCH,PELIAS_AUTOCOMPLETE'],
geocoderProvidersFallback: process.env.GEOCODER_PROVIDERS_FALLBACK ?? 'GMAPS',
geocoderProvidersFallback: process.env.GEOCODER_PROVIDERS_FALLBACK
? process.env.GEOCODER_PROVIDERS_FALLBACK?.split(',')
: ['GMAPS'],
}));