src/controllers/socialController.js
/**
   * @description Find user in database
   * @param  {object} profile - The user information
   * @returns  {object} The response object
   */
@description Find user in database
@param  {object} profile - The user information
@returns  {object} The response object
@description Find user in database @param { object } profile - The user information @returns { object } The response object
static async findSocialUser(profile) {
    try {
      const selector = { where: { social_id: profile.id, provider: profile.provider } };
      const userData = await User.findOne(selector);
      return userData;
    } catch (ex) {
      throw new Error(ex);
    }
  }
static async findSocialUser ( profile ) { try { const selector = { where : { social_id : profile . id , provider : profile . provider } } ; const userData = await User . findOne ( selector ) ; return userData ; } catch ( ex ) { throw new Error ( ex ) ; } }
@description Find user in database
 @param  {object} profile - The user information
 @returns  {object} The response object
@description Find user in database @param { object } profile - The user information @returns { object } The response object