log
This commit is contained in:
@@ -79,15 +79,7 @@ app.post('/api', (req, res) => {
|
||||
|
||||
if (bufferSignature.length === bufferDigest.length && crypto.timingSafeEqual(bufferSignature, bufferDigest)) {
|
||||
// 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');
|
||||
});
|
||||
} else {
|
||||
res.status(401).send('Invalid secret');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user