@@ -2,15 +2,9 @@ import { calendar_v3 } from "@googleapis/calendar";
22import { OAuth2Client } from "googleapis-common" ;
33import type { NextApiRequest , NextApiResponse } from "next" ;
44
5- import { updateProfilePhotoGoogle } from "@calcom/app-store/_utils/oauth/updateProfilePhotoGoogle" ;
65import GoogleCalendarService from "@calcom/app-store/googlecalendar/lib/CalendarService" ;
76import { renewSelectedCalendarCredentialId } from "@calcom/lib/connectedCalendar" ;
8- import {
9- GOOGLE_CALENDAR_SCOPES ,
10- SCOPE_USERINFO_PROFILE ,
11- WEBAPP_URL ,
12- WEBAPP_URL_FOR_OAUTH ,
13- } from "@calcom/lib/constants" ;
7+ import { GOOGLE_CALENDAR_SCOPES , WEBAPP_URL , WEBAPP_URL_FOR_OAUTH } from "@calcom/lib/constants" ;
148import { getSafeRedirectUrl } from "@calcom/lib/getSafeRedirectUrl" ;
159import { HttpError } from "@calcom/lib/http-error" ;
1610import { defaultHandler } from "@calcom/lib/server/defaultHandler" ;
@@ -101,9 +95,10 @@ async function getHandler(req: NextApiRequest, res: NextApiResponse) {
10195 }
10296
10397 // Only attempt to update the user's profile photo if the user has granted the required scope
104- if ( grantedScopes . includes ( SCOPE_USERINFO_PROFILE ) ) {
105- await updateProfilePhotoGoogle ( oAuth2Client , req . session . user . id ) ;
106- }
98+ // TODO: Use the avatarUrl when setting the profile picture
99+ // if (grantedScopes.includes(SCOPE_USERINFO_PROFILE)) {
100+ // await updateProfilePhotoGoogle(oAuth2Client, req.session.user.id);
101+ // }
107102
108103 const selectedCalendarWhereUnique = {
109104 userId : req . session . user . id ,
0 commit comments