Enabled restarting your application from denied state
Some checks failed
Continuous Deployment / Update Deployment (push) Failing after 1m23s
Some checks failed
Continuous Deployment / Update Deployment (push) Failing after 1m23s
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user