Skip to content

Catalog update + script fixes 7 august 2025 #7824

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/catalog/updateSources.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const updateSources = async () => {
while (nextPageToken !== undefined) {
const res = await getCatalog(`${PAPI_URL}/catalog/sources/`, nextPageToken);
sources = sources.concat(res.data.sourcesCatalog);
nextPageToken = res.data.pagination.next;
nextPageToken = res.data.pagination?.next;
}

// Sort the sources alphabetically
Expand Down
14 changes: 8 additions & 6 deletions scripts/catalog/utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,19 @@ const getCatalog = async (url, page_token = "MA==") => {
'Content-Type': 'application/json',
'Authorization': `Bearer ${process.env.PAPI_TOKEN}`
},
data: {
"pagination": {
"count": 200,
"cursor": page_token
}
params: {
"pagination.count": 200,
"pagination.cursor": page_token
}
});

return res.data;
} catch (error) {
console.log("Something went wrong with the request to the Public API.\nIf you're updating a private destination, ensure the ID is correct.");
console.log("Something went wrong with the request to the Public API.");
console.log("Error:", error.message);
console.log("Status:", error.response?.status);
console.log("Data:", error.response?.data);
throw error;
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/_data/catalog/destination_categories.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# AUTOGENERATED FROM PUBLIC API. DO NOT EDIT
# destination categories last updated 2025-07-31
# destination categories last updated 2025-08-07
items:
- display_name: A/B Testing
slug: a-b-testing
Expand Down
Loading
Loading