From d0a35deeecb98156ce5687d0ec512c64951991d8 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Wed, 6 Dec 2023 21:46:08 +0200 Subject: [PATCH] Fix OpenAI presets extension --- src/endpoints/presets.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/endpoints/presets.js b/src/endpoints/presets.js index f67900aff..0c2f15a21 100644 --- a/src/endpoints/presets.js +++ b/src/endpoints/presets.js @@ -103,7 +103,7 @@ router.post('/save-openai', jsonParser, function (request, response) { const name = sanitize(request.query.name); if (!name) return response.sendStatus(400); - const filename = `${name}.settings`; + const filename = `${name}.json`; const fullpath = path.join(DIRECTORIES.openAI_Settings, filename); writeFileAtomicSync(fullpath, JSON.stringify(request.body, null, 4), 'utf-8'); return response.send({ name }); @@ -116,7 +116,7 @@ router.post('/delete-openai', jsonParser, function (request, response) { } const name = request.body.name; - const pathToFile = path.join(DIRECTORIES.openAI_Settings, `${name}.settings`); + const pathToFile = path.join(DIRECTORIES.openAI_Settings, `${name}.json`); if (fs.existsSync(pathToFile)) { fs.rmSync(pathToFile);