Enabled restarting your application from denied state
Some checks failed
Continuous Deployment / Update Deployment (push) Failing after 1m23s

This commit is contained in:
2025-12-08 17:10:53 -05:00
parent df89d9bf67
commit e61bd1c5a1
3 changed files with 37 additions and 5 deletions

View File

@@ -22,8 +22,8 @@ router.post('/', async (req, res) => {
res.sendStatus(201);
} catch (err) {
console.error('Insert failed:', err);
res.status(500).json({ error: 'Failed to save application' });
console.error('Failed to create application: \n', err);
res.status(500).json({ error: 'Failed to create application' });
}
});
@@ -170,4 +170,15 @@ VALUES(?, ?, ?);`
}
});
router.post('/restart', async (req: Request, res: Response) => {
const user = req.user.id;
try {
await setUserState(user, MemberState.Guest);
res.sendStatus(200);
} catch (error) {
console.error('Comment failed:', error);
res.status(500).json({ error: 'Could not rester application' });
}
})
module.exports = router;