Use named constant
This commit is contained in:
parent
04a5d9694e
commit
18fa925855
|
@ -1535,8 +1535,8 @@ app.post("/delchat", jsonParser, function (request, response) {
|
|||
app.post('/renamebackground', jsonParser, function (request, response) {
|
||||
if (!request.body) return response.sendStatus(400);
|
||||
|
||||
const oldFileName = path.join('public/backgrounds/', sanitize(request.body.old_bg));
|
||||
const newFileName = path.join('public/backgrounds/', sanitize(request.body.new_bg));
|
||||
const oldFileName = path.join(DIRECTORIES.backgrounds, sanitize(request.body.old_bg));
|
||||
const newFileName = path.join(DIRECTORIES.backgrounds, sanitize(request.body.new_bg));
|
||||
|
||||
if (!fs.existsSync(oldFileName)) {
|
||||
console.log('BG file not found');
|
||||
|
|
Loading…
Reference in New Issue