@base44-preview/cli 0.0.50-pr.475.2394181 → 0.0.50-pr.475.58ca3bc

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/cli/index.js CHANGED
@@ -253522,7 +253522,7 @@ function createAuthRouter(db2, logger2) {
253522
253522
  const privateUserData = await privateUserCollection?.findOneAsync({
253523
253523
  email: email3
253524
253524
  });
253525
- const otpCode = privateUserData ? privateUserData.otpCode : generateCode();
253525
+ const otpCode = generateCode();
253526
253526
  const id2 = privateUserData ? privateUserData.id : nanoid3();
253527
253527
  if (!privateUserData) {
253528
253528
  await privateUserCollection?.insertAsync({
@@ -253532,6 +253532,15 @@ function createAuthRouter(db2, logger2) {
253532
253532
  password,
253533
253533
  createdAt: Date.now()
253534
253534
  });
253535
+ } else {
253536
+ await privateUserCollection?.updateAsync({
253537
+ email: email3
253538
+ }, {
253539
+ $set: {
253540
+ otpCode,
253541
+ createdAt: Date.now()
253542
+ }
253543
+ });
253535
253544
  }
253536
253545
  logger2.log(theme.styles.info(`
253537
253546
  In order to complete registration use this verification code: ${otpCode}
@@ -260384,4 +260393,4 @@ export {
260384
260393
  CLIExitError
260385
260394
  };
260386
260395
 
260387
- //# debugId=033335773979C1A464756E2164756E21
260396
+ //# debugId=87279C94ABAC181364756E2164756E21