Compare commits
No commits in common. "588efcad3dba8e1ee49b90aeb6757da6772ddc35" and "70337a421862746cc72b85efc082a396b03f4272" have entirely different histories.
588efcad3d
...
70337a4218
|
@ -63,7 +63,6 @@
|
||||||
id="button"
|
id="button"
|
||||||
>Register</a
|
>Register</a
|
||||||
>
|
>
|
||||||
<br />
|
|
||||||
<img
|
<img
|
||||||
src="https://barcodes.fjla.uk/generate?type=aztec&text=https%3A%2F%2Fowlboard.info%2Fmore%2Freg%2Fsubmit%3Fkey%3D>>ACCESSCODE<<"
|
src="https://barcodes.fjla.uk/generate?type=aztec&text=https%3A%2F%2Fowlboard.info%2Fmore%2Freg%2Fsubmit%3Fkey%3D>>ACCESSCODE<<"
|
||||||
alt="Scan barcode to register on another device"
|
alt="Scan barcode to register on another device"
|
||||||
|
|
|
@ -22,11 +22,10 @@ async function isAuthed(uuid: string): Promise<boolean> {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Checks whether a registration request key is valid
|
// Checks whether a registration request key is valid
|
||||||
async function checkRequest(key: string) { // For some reason db.query seems to return correctly, but the second logs.out statement prints []??? so registration fails!!
|
async function checkRequest(key: string) {
|
||||||
const collection = "registrations";
|
const collection = "registrations";
|
||||||
const query = { uuid: key };
|
const query = { uuid: key };
|
||||||
const res = await db.query(collection, query);
|
const res = await db.query(collection, query);
|
||||||
logs.out("authUtils.checkRequest: Raw Result: " + res, "dbug")
|
|
||||||
logs.out(
|
logs.out(
|
||||||
"authUtils.checkRequest: DB Query result: " + JSON.stringify(res),
|
"authUtils.checkRequest: DB Query result: " + JSON.stringify(res),
|
||||||
"dbug"
|
"dbug"
|
||||||
|
@ -40,7 +39,7 @@ async function checkRequest(key: string) { // For some reason db.query seems to
|
||||||
|
|
||||||
// Creates an API key for a user
|
// Creates an API key for a user
|
||||||
async function generateKey() {
|
async function generateKey() {
|
||||||
// Needs testing & moving to 'register.utils' ??? Why does it need moving?
|
// Needs testing & moving to 'register.utils'
|
||||||
return crypt.randomUUID();
|
return crypt.randomUUID();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue