Replaced config dependency with options argument.
This commit is contained in:
parent
83294ec6f4
commit
7a39529e2c
2
geo.mjs
2
geo.mjs
|
@ -32,7 +32,7 @@ export async function resolvePlace(query, context, options = {}) {
|
||||||
// https://operations.osmfoundation.org/policies/nominatim/
|
// https://operations.osmfoundation.org/policies/nominatim/
|
||||||
const res = await context.unprint.get(`https://nominatim.openstreetmap.org/search?q=${encodeURI(query)}&format=json&accept-language=en&addressdetails=1`, {
|
const res = await context.unprint.get(`https://nominatim.openstreetmap.org/search?q=${encodeURI(query)}&format=json&accept-language=en&addressdetails=1`, {
|
||||||
headers: {
|
headers: {
|
||||||
'User-Agent': context.config.location.userAgent,
|
'User-Agent': options.userAgent,
|
||||||
},
|
},
|
||||||
interval: 1000,
|
interval: 1000,
|
||||||
concurrency: 1,
|
concurrency: 1,
|
||||||
|
|
Loading…
Reference in New Issue