@studyportals/fawkes 2.0.1-38 → 2.0.1-39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -27,14 +27,14 @@ export class UniversityCountryPolicy extends BaseSeoIndexabilityPolicy {
|
|
|
27
27
|
const organisationIds = await searchApiClient.getOrganisationIds();
|
|
28
28
|
const organisations = await organisationsClient.getOrganisations(organisationIds);
|
|
29
29
|
const countries = CountryPresenter.getInstance().getFragments();
|
|
30
|
+
const isoToPath = new Map(countries.map((country) => [country.iso, country.path]));
|
|
30
31
|
// eslint-disable-next-line no-console
|
|
31
|
-
console.log("COUNTRY_FRAGMENTS: ", JSON.stringify(countries));
|
|
32
|
-
const isoToPath = new Map(countries.map(country => [country.iso, country.path]));
|
|
32
|
+
console.log("COUNTRY_FRAGMENTS: ", JSON.stringify(countries.map((country) => [country.iso, country.path])));
|
|
33
33
|
// eslint-disable-next-line no-console
|
|
34
|
-
console.log("ISO_TO_PATH: ",
|
|
34
|
+
console.log("ISO_TO_PATH: ", isoToPath.size);
|
|
35
35
|
const paths = [];
|
|
36
|
-
organisations.forEach(org => {
|
|
37
|
-
org.countryIsoCodes.forEach(iso => {
|
|
36
|
+
organisations.forEach((org) => {
|
|
37
|
+
org.countryIsoCodes.forEach((iso) => {
|
|
38
38
|
const countryVirtualPath = isoToPath.get(iso);
|
|
39
39
|
if (countryVirtualPath) {
|
|
40
40
|
paths.push(`/${countryVirtualPath}/${org.virtualPath}/${org.id}`);
|
|
@@ -43,7 +43,7 @@ export class UniversityCountryPolicy extends BaseSeoIndexabilityPolicy {
|
|
|
43
43
|
});
|
|
44
44
|
// eslint-disable-next-line no-console
|
|
45
45
|
console.log("Paths: ", JSON.stringify(paths));
|
|
46
|
-
return
|
|
46
|
+
return paths;
|
|
47
47
|
}
|
|
48
48
|
catch (error) {
|
|
49
49
|
console.error("Fawkes burned: Error when generating country/university URLs. ", error);
|