Saving token used and time joined

This commit is contained in:
metacryst
2025-11-24 00:56:15 -06:00
parent 40e7987ca2
commit 6299e80268
7 changed files with 81 additions and 62 deletions

View File

@@ -39,7 +39,7 @@ export default class Database {
try {
let collection = this.fromID[type]
if(collection) {
collection.add(node)
collection.save(node)
} else {
throw new Error("Type does not exist for node: ", id)
}
@@ -77,6 +77,7 @@ export default class Database {
}
}
await fs.writeFile(path.join(process.cwd(), 'db/db.json'), JSON.stringify(data, null, 4), "utf8");
let string = JSON.stringify(data, null, 4)
await fs.writeFile(path.join(process.cwd(), 'db/db.json'), string, "utf8");
}
}