Browse Source

Return Error is the archive is not uploaded correctly.

test-gpt-generated
Roman Axelrod 3 years ago
parent
commit
804c504c06
  1. 6
      server.js

6
server.js

@ -120,6 +120,12 @@ app.get('/publish', async (req, res) => {
body,
headers: {'Content-Type': 'application/zip'}
});
if (response.status !== 200) {
res.json({success: false, message: "Can't upload the archive, permissions error."});
await fs.unlink('./dist.zip');
return;
}
}
res.json({success: true});

Loading…
Cancel
Save