From 65c1c35d10c66e80d06280c82234d0b397ecd7d4 Mon Sep 17 00:00:00 2001 From: Cassie Tarakajian Date: Fri, 25 Jan 2019 15:11:55 -0500 Subject: [PATCH] fix fetch-examples script to adjust to changes to the p5.js website --- server/scripts/examples.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/scripts/examples.js b/server/scripts/examples.js index fc5ae1a2..18d8bb9d 100644 --- a/server/scripts/examples.js +++ b/server/scripts/examples.js @@ -49,7 +49,7 @@ mongoose.connection.on('error', () => { function getCategories() { const categories = []; const options = { - url: `https://api.github.com/repos/processing/p5.js-website/contents/dist/assets/examples/en?client_id=${ + url: `https://api.github.com/repos/processing/p5.js-website/contents/src/data/examples/en?client_id=${ clientId}&client_secret=${clientSecret}`, method: 'GET', headers, @@ -134,7 +134,7 @@ function getSketchContent(projectsInAllCategories) { function createProjectsInP5user(projectsInAllCategories) { const options = { - url: `https://api.github.com/repos/processing/p5.js-website/contents/dist/assets/examples/assets?client_id=${ + url: `https://api.github.com/repos/processing/p5.js-website/contents/src/data/examples/assets?client_id=${ clientId}&client_secret=${clientSecret}`, method: 'GET', headers, @@ -264,7 +264,7 @@ function createProjectsInP5user(projectsInAllCategories) { const fileID = objectID().toHexString(); newProject.files.push({ name: assetName, - url: `https://rawgit.com/processing/p5.js-website/master/dist/assets/examples/assets/${assetName}`, + url: `https://rawgit.com/processing/p5.js-website/master/src/data/examples/assets/${assetName}`, id: fileID, _id: fileID, children: [],