Rename settings API endpoints

This commit is contained in:
valadaptive
2023-12-14 16:47:03 -05:00
parent f93e40b1d3
commit 769cc0a78f
4 changed files with 6 additions and 6 deletions

View File

@@ -332,7 +332,7 @@ app.post('/deleteuseravatar', jsonParser, function (request, response) {
});
app.post('/savesettings', jsonParser, function (request, response) {
app.post('/api/settings/save', jsonParser, function (request, response) {
try {
writeFileAtomicSync('public/settings.json', JSON.stringify(request.body, null, 4), 'utf8');
response.send({ result: 'ok' });
@@ -394,7 +394,7 @@ function readPresetsFromDirectory(directoryPath, options = {}) {
}
// Wintermute's code
app.post('/getsettings', jsonParser, (request, response) => {
app.post('/api/settings/get', jsonParser, (request, response) => {
let settings;
try {
settings = fs.readFileSync('public/settings.json', 'utf8');