diff --git a/src/services/vendorOrderServices/readVendorOrder.ts b/src/services/vendorOrderServices/readVendorOrder.ts index feec0c3..9671608 100644 --- a/src/services/vendorOrderServices/readVendorOrder.ts +++ b/src/services/vendorOrderServices/readVendorOrder.ts @@ -102,7 +102,7 @@ export const getSingleVendorOrderService = async (req: Request, res: Response) = id: vendorOrder.order.buyer.id, firstName: vendorOrder.order.buyer.firstName, lastName: vendorOrder.order.buyer.lastName, - email: vendorOrder.order.buyer.lastName, + email: vendorOrder.order.buyer.email, gender: vendorOrder.order.buyer.gender, phoneNumber: vendorOrder.order.buyer.phoneNumber, photoUrl: vendorOrder.order.buyer.photoUrl, diff --git a/src/utils/auth.ts b/src/utils/auth.ts index f09ca47..b613ed9 100644 --- a/src/utils/auth.ts +++ b/src/utils/auth.ts @@ -11,7 +11,7 @@ passport.use( { clientID: process.env.GOOGLE_CLIENT_ID as string, clientSecret: process.env.GOOGLE_CLIENT_SECRET as string, - callbackURL: `http://localhost:${process.env.PORT || 8000}/user/auth/google/callback/`, + callbackURL: `${process.env.API_URL}/user/auth/google/callback/`, scope: ['email', 'profile'], }, async (accessToken: any, refreshToken: any, profile: any, cb: any) => {