From d17feadd61991d7e8ee1d2b03d897ff747d2bb35 Mon Sep 17 00:00:00 2001 From: Dan Hoizner Date: Wed, 24 Jun 2020 18:43:10 -0400 Subject: [PATCH 1/2] update examples.js to strip the proper ref name. --- server/scripts/examples.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/scripts/examples.js b/server/scripts/examples.js index 7e11fe3d..be0d4ef4 100644 --- a/server/scripts/examples.js +++ b/server/scripts/examples.js @@ -73,7 +73,7 @@ function getCategories() { function getSketchesInCategories(categories) { return Q.all(categories.map((category) => { const options = { - url: `${category.url.replace('?ref=master', '')}?client_id=${clientId}&client_secret=${clientSecret}`, + url: `${category.url.replace('?ref=main', '')}?client_id=${clientId}&client_secret=${clientSecret}`, method: 'GET', headers, json: true @@ -107,7 +107,7 @@ function getSketchesInCategories(categories) { function getSketchContent(projectsInAllCategories) { return Q.all(projectsInAllCategories.map(projectsInOneCategory => Q.all(projectsInOneCategory.map((project) => { const options = { - url: `${project.sketchUrl.replace('?ref=master', '')}?client_id=${clientId}&client_secret=${clientSecret}`, + url: `${project.sketchUrl.replace('?ref=main', '')}?client_id=${clientId}&client_secret=${clientSecret}`, method: 'GET', headers }; From 03467849201185a755cb478d835bca5897201f62 Mon Sep 17 00:00:00 2001 From: Cassie Tarakajian Date: Mon, 29 Jun 2020 18:28:24 -0400 Subject: [PATCH 2/2] [#1473] Update `master` to `main` in examples.js - Update CDN URL links for assets on p5.js website --- server/scripts/examples.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/scripts/examples.js b/server/scripts/examples.js index be0d4ef4..e905fca3 100644 --- a/server/scripts/examples.js +++ b/server/scripts/examples.js @@ -264,7 +264,7 @@ function createProjectsInP5user(projectsInAllCategories) { const fileID = objectID().toHexString(); newProject.files.push({ name: assetName, - url: `https://cdn.jsdelivr.net/gh/processing/p5.js-website@master/src/data/examples/assets/${assetName}`, + url: `https://cdn.jsdelivr.net/gh/processing/p5.js-website@main/src/data/examples/assets/${assetName}`, id: fileID, _id: fileID, children: [],