feat: improve setup logs

pull/239/head
Josh Moore 8 months ago
parent 5e7016a0c6
commit 38c235c836

@ -14,7 +14,7 @@ router.post('/setup', BodyParserJson(), async (req, res) => {
if (UserConfig.ready)
return res.status(409).json({ success: false, message: 'User config already exists' });
log.debug('Setup initiated');
log.info('Setup', 'initiated');
try {
// Parse body
@ -27,6 +27,8 @@ router.post('/setup', BodyParserJson(), async (req, res) => {
if (UserConfig.config.sql?.mySql != null)
await Promise.all([MySql.configure(), data.setDataModeToSql()]);
log.success('Setup', 'completed');
return res.json({ success: true });
} catch (err: any) {
return res.status(400).json({ success: false, message: err.message });

Loading…
Cancel
Save