@edgedev/firebase 2.1.58 → 2.1.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/edgeFirebase.ts +11 -2
- package/package.json +1 -1
package/edgeFirebase.ts
CHANGED
|
@@ -601,8 +601,17 @@ export const EdgeFirebase = class {
|
|
|
601
601
|
}
|
|
602
602
|
}
|
|
603
603
|
}
|
|
604
|
-
|
|
605
|
-
|
|
604
|
+
let userSnap = null;
|
|
605
|
+
try {
|
|
606
|
+
const userRef = doc(this.db, "staged-users", userRegister.registrationCode);
|
|
607
|
+
userSnap = await getDoc(userRef);
|
|
608
|
+
} catch (error) {
|
|
609
|
+
return this.sendResponse({
|
|
610
|
+
success: false,
|
|
611
|
+
message: "Registration code already used.",
|
|
612
|
+
meta: {}
|
|
613
|
+
});
|
|
614
|
+
}
|
|
606
615
|
if (userSnap.exists()) {
|
|
607
616
|
const user = userSnap.data();
|
|
608
617
|
if (user.userId) {
|