Updated the register to only allow to create users if they have a code available
This commit is contained in:
@@ -28,7 +28,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||
}
|
||||
|
||||
const codePromises = codes.map(async (code, index) => {
|
||||
const codeRef = doc(db, "codes", uuidv4());
|
||||
const codeRef = doc(db, "codes", code);
|
||||
await setDoc(codeRef, {type, code});
|
||||
|
||||
if (emails && emails.length > index) {
|
||||
|
||||
Reference in New Issue
Block a user