forked from DebaucheryLibrarian/traxxx
Using options instead of config dependency for common location resolver.
This commit is contained in:
@@ -39,7 +39,6 @@ const { resolveLayoutScraper } = require('./scrapers/resolve');
|
||||
const getRecursiveParameters = require('./utils/get-recursive-parameters');
|
||||
|
||||
const commonContext = {
|
||||
argv,
|
||||
knex,
|
||||
redis,
|
||||
logger,
|
||||
@@ -474,8 +473,8 @@ async function curateProfile(profile, actor) {
|
||||
|
||||
if (argv.resolvePlace) {
|
||||
const [placeOfBirth, placeOfResidence] = await Promise.all([
|
||||
resolvePlace(profile.birthPlace, commonContext),
|
||||
resolvePlace(profile.residencePlace, commonContext),
|
||||
resolvePlace(profile.birthPlace, commonContext, { useCache: argv.placeCache, userAgent: config.location.userAgent }),
|
||||
resolvePlace(profile.residencePlace, commonContext, { useCache: argv.placeCache, userAgent: config.location.userAgent }),
|
||||
]);
|
||||
|
||||
curatedProfile.placeOfBirth = placeOfBirth;
|
||||
|
||||
Reference in New Issue
Block a user