mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-05-14 14:51:18 -04:00
Correct preview route for fastly
- use more explicit route - handle fastly error in the callback correctly - more succinct parsing of the URL path
This commit is contained in:
parent
d1420862ea
commit
6df58e41fd
3 changed files with 11 additions and 23 deletions
|
@ -176,7 +176,7 @@ async.auto({
|
|||
if (err) throw new Error(err);
|
||||
if (process.env.FASTLY_ACTIVATE_CHANGES) {
|
||||
fastly.activateVersion(results.version, function (e, resp) {
|
||||
if (err) throw new Error(e);
|
||||
if (e) throw new Error(e);
|
||||
process.stdout.write('Successfully configured and activated version ' + resp.number + '\n');
|
||||
if (process.env.FASTLY_PURGE_ALL) {
|
||||
fastly.purgeAll(FASTLY_SERVICE_ID, function (error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue