User Submitting Signup

This commit is contained in:
metacryst
2025-11-18 07:58:35 -06:00
parent 81ca35bf2f
commit b8e48f7945
8 changed files with 196 additions and 35 deletions

View File

@@ -1,6 +1,20 @@
import QuillDB from "../_/quilldb.js"
import fs from 'fs/promises'
import path from 'path'
export default class Database extends QuillDB {
tokens;
constructor() {
super()
this.loadTokens()
}
async loadTokens() {
const tokenData = await fs.readFile(path.join(process.cwd(), 'db/tokens.json'), 'utf8');
let tokenJSON = JSON.parse(tokenData);
this.tokens = tokenJSON
}
get = {
user: (id) => {
@@ -15,6 +29,9 @@ export default class Database extends QuillDB {
}
return null;
},
token: (id) => {
return this.tokens[id]
}
}
generateUserID() {