Ensure domain is stored alongside reg request

This commit is contained in:
Fred Boniface 2023-04-05 21:39:28 +01:00
parent 379b35b6f7
commit 1cc7e19681

View File

@ -42,9 +42,9 @@ async function addUser(uuid, domain) { // Needs testing
return res; return res;
} }
async function addRegReq(uuid) { // Needs testing async function addRegReq(uuid, domain) { // Needs testing
log.out(`dbAccess.addRegReq: Adding registration request`) log.out(`dbAccess.addRegReq: Adding registration request`)
let doc = {uuid: uuid, time: new Date} let doc = {uuid: uuid, time: new Date, domain: domain}
await client.connect(); await client.connect();
let col = db.collection("registrations"); let col = db.collection("registrations");
res = col.insertOne(doc); res = col.insertOne(doc);