Update .gitignore and add new dependencies and routes
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -71,7 +71,7 @@ router.get('/translateAll', async (req, res) => {
|
||||
});
|
||||
|
||||
router.get('/setup', (req, res) => {
|
||||
fs.readFile(path.join(__dirname, '../setup.json'), 'utf8', (err, data) => {
|
||||
fs.readFile(path.join(__dirname, '../data/setup.json'), 'utf8', (err, data) => {
|
||||
if (err) {
|
||||
ErrorLogger.error('Error reading setup.json:', err);
|
||||
return res.status(500).json({ success: false, message: 'Error reading setup.json.' });
|
||||
@@ -101,7 +101,7 @@ router.post('/setup/save', (req, res) => {
|
||||
setupData.discord = req.body.discord;
|
||||
}
|
||||
|
||||
fs.writeFile(path.join(__dirname, '../setup.json'), JSON.stringify(setupData, null, 2), (err) => {
|
||||
fs.writeFile(path.join(__dirname, '../data/setup.json'), JSON.stringify(setupData, null, 2), (err) => {
|
||||
if (err) {
|
||||
ErrorLogger.error('Error writing to setup.json:', err);
|
||||
return res.status(500).json({ success: false, message: 'Error writing to setup.json.' });
|
||||
|
||||
Reference in New Issue
Block a user