diff options
| author | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2024-03-07 22:23:43 +0000 |
|---|---|---|
| committer | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2024-03-07 22:23:43 +0000 |
| commit | 426c77554bdb2bf06b97ba49d15407150b4f4bf9 (patch) | |
| tree | e440d5b34fc3dc368936d83c2ef2cfc8420375b9 /src/db.js | |
| parent | 52cbc5ac4e0b2a4f81d70050ba2e83ad8541db0d (diff) | |
Corrects file path
Diffstat (limited to 'src/db.js')
| -rw-r--r-- | src/db.js | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -42,7 +42,7 @@ function getSubscriptionFromNumber(number) { async function save() { try { - await writeFile('../data.json', JSON.stringify({ subscriptions })); + await writeFile('./data.json', JSON.stringify({ subscriptions })); } catch (err) { if (typeof err === 'string') { console.error(`Error writing data: ${err}`); @@ -54,7 +54,7 @@ async function save() { function load() { try { - const data = JSON.parse(readFileSync('../data.json')); + const data = JSON.parse(readFileSync('./data.json')); while (subscriptions.pop()) {} subscriptions.push(...data['subscriptions']); } catch (err){ |
