Saving token used and time joined
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user