Cailean Finn 6 months ago
parent
commit
ccbdf4da0c
  1. 8
      server.js

8
server.js

@ -79,15 +79,7 @@ app.post('/api', (req, res) => {
if (bufferSignature.length === bufferDigest.length && crypto.timingSafeEqual(bufferSignature, bufferDigest)) { if (bufferSignature.length === bufferDigest.length && crypto.timingSafeEqual(bufferSignature, bufferDigest)) {
// Secret is valid, update the repository // Secret is valid, update the repository
exec('/home/gnome.sh', (err, stdout, stderr) => {
if (err) {
console.error(`Error updating repository: ${stderr}`);
return res.status(500).send('Server error');
}
console.log(`Repository updated: ${stdout}`);
res.status(200).send('Repository updated successfully'); res.status(200).send('Repository updated successfully');
});
} else { } else {
res.status(401).send('Invalid secret'); res.status(401).send('Invalid secret');
} }

Loading…
Cancel
Save