diff options
Diffstat (limited to 'scripts/update.js')
-rw-r--r-- | scripts/update.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/update.js b/scripts/update.js index 802cd64..c48c67c 100644 --- a/scripts/update.js +++ b/scripts/update.js | |||
@@ -10,7 +10,7 @@ const semver = require('semver'); | |||
10 | console.log("Ferdi Recipe Repository Updater v1.0.0"); | 10 | console.log("Ferdi Recipe Repository Updater v1.0.0"); |
11 | 11 | ||
12 | // Server to update from | 12 | // Server to update from |
13 | const server = "http://api.franzinfra.com/v1/"; | 13 | const server = "http://api.franzinfra.com/v1"; |
14 | 14 | ||
15 | // Create paths to important files | 15 | // Create paths to important files |
16 | const allJson = path.join('../', 'all.json'); | 16 | const allJson = path.join('../', 'all.json'); |
@@ -48,7 +48,7 @@ const decompress = (src, dest) => { | |||
48 | // Let us work in an async environment | 48 | // Let us work in an async environment |
49 | (async () => { | 49 | (async () => { |
50 | // Get current recipes from server | 50 | // Get current recipes from server |
51 | const serverRecipes = await (await fetch(server + 'recipes')).json(); | 51 | const serverRecipes = await (await fetch(server + '/recipes')).json(); |
52 | 52 | ||
53 | // Get current local recipes | 53 | // Get current local recipes |
54 | const localRecipes = await fs.readJson(allJson); | 54 | const localRecipes = await fs.readJson(allJson); |
@@ -66,6 +66,7 @@ const decompress = (src, dest) => { | |||
66 | 66 | ||
67 | // Download recipe to filesystem | 67 | // Download recipe to filesystem |
68 | try { | 68 | try { |
69 | console.log("Downloading " + server + '/recipes/download/' + recipe.id); | ||
69 | await downloadFile( | 70 | await downloadFile( |
70 | server + '/recipes/download/' + recipe.id, | 71 | server + '/recipes/download/' + recipe.id, |
71 | compressed | 72 | compressed |