Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async fetchFromGoogle(profile: Profile): Promise {
return await this.userRepository.findOne({
attributes: getAttributes([
'identity',
'firstName',
'lastName',
'email'
]),
where: {
provider: profile.provider,
providerId: profile.id,
}
});
}
async fetchAll(): Promise {
return await this.userRepository.findAll({
attributes: getAttributes([
'identity',
'firstName',
'lastName',
'email',
'provider',
'avatar'
])
});
}