Minor db struct changes

This commit is contained in:
mrfry
2021-05-26 16:10:58 +02:00
parent ca742fce80
commit 164e22d888
5 changed files with 3 additions and 12 deletions

View File

@@ -11,10 +11,6 @@
"notNull": true, "notNull": true,
"unique": true "unique": true
}, },
"oldCID": {
"type": "text",
"unique": true
},
"notes": { "notes": {
"type": "text" "type": "text"
}, },
@@ -40,10 +36,6 @@
"type": "number", "type": "number",
"defaultZero": true "defaultZero": true
}, },
"pwGotFromCID": {
"type": "number",
"defaultZero": true
},
"createdBy": { "createdBy": {
"type": "number" "type": "number"
} }

View File

@@ -40,7 +40,6 @@ function CreateDB() {
try { try {
dbtools.Insert(authDB, 'users', { dbtools.Insert(authDB, 'users', {
pw: uuidv4(), pw: uuidv4(),
oldCID: cid,
avaiblePWRequests: 4, avaiblePWRequests: 4,
created: utils.GetDateString(), created: utils.GetDateString(),
}) })

View File

@@ -63,9 +63,9 @@ export interface User {
id: number id: number
pw: string pw: string
pwRequestCount: number pwRequestCount: number
pwGotFromCID: number
avaiblePWRequests: number avaiblePWRequests: number
loginCount: number loginCount: number
createdBy: number
} }
export interface Request extends express.Request { export interface Request extends express.Request {