src/services/user.service.js
/**
   * Checks if a user exists with a given email address.
   *
   * @param {string} email
   * @returns
   */
Checks if a user exists with a given email address.
@param {string} email
@returns
Checks if a user exists with a given email address . @param { string } email @returns
static async exists(email) {
    try {
      const count = await User.count({
        where: {
          email,
        },
      });
      return count > 0;
    } catch (error) {
      throw error;
    }
  }
static async exists ( email ) { try { const count = await User . count ( { where : { email , } , } ) ; return count > 0 ; } catch ( error ) { throw error ; } }
Checks if a user exists with a given email address.
Checks if a user exists with a given email address .