@joystick.js/node-canary 0.0.0-canary.90 → 0.0.0-canary.92
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/dist/app/index.js
CHANGED
|
@@ -197,6 +197,10 @@ class App {
|
|
|
197
197
|
res.status(200).send({ data: {}, translations: {} });
|
|
198
198
|
});
|
|
199
199
|
this.express.app.post("/api/_test/accounts/signup", async (req, res) => {
|
|
200
|
+
const existingUser = await runUserQuery("user", { emailAddress: req?.body?.emailAddress });
|
|
201
|
+
if (existingUser) {
|
|
202
|
+
await runUserQuery("deleteUser", { userId: existingUser?._id || existingUser?.user_id });
|
|
203
|
+
}
|
|
200
204
|
const signup = await accounts.signup({
|
|
201
205
|
emailAddress: req?.body?.emailAddress,
|
|
202
206
|
password: req?.body?.password,
|