feat: User onboarding finished
This commit is contained in:
@@ -44,6 +44,26 @@ export class UserProfileRepository {
|
||||
}
|
||||
}
|
||||
|
||||
async getByEmail(email: string): Promise<UserProfile | null> {
|
||||
const query = `
|
||||
SELECT ${USER_PROFILE_COLUMNS}
|
||||
FROM user_profiles
|
||||
WHERE email = $1
|
||||
LIMIT 1
|
||||
`;
|
||||
|
||||
try {
|
||||
const result = await this.pool.query(query, [email]);
|
||||
if (result.rows.length === 0) {
|
||||
return null;
|
||||
}
|
||||
return this.mapRowToUserProfile(result.rows[0]);
|
||||
} catch (error) {
|
||||
logger.error('Error fetching user profile by email', { error });
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
async create(
|
||||
auth0Sub: string,
|
||||
email: string,
|
||||
|
||||
Reference in New Issue
Block a user