diff --git a/src/modules/auth/controllers/googleCallback.controller.ts b/src/modules/auth/controllers/googleCallback.controller.ts index da9b468..9ae69d8 100644 --- a/src/modules/auth/controllers/googleCallback.controller.ts +++ b/src/modules/auth/controllers/googleCallback.controller.ts @@ -1,5 +1,5 @@ import { Context } from "elysia"; -import { returnWriteResponse } from "../../../helpers/callback/httpResponse"; +import { returnReadResponse } from "../../../helpers/callback/httpResponse"; import { mainErrorHandler } from "../../../helpers/error/handler"; import { googleCallbackService } from "../services/http/googleCallback.service"; import { getUserHeaderInformation } from "../../../helpers/http/userHeader/getUserHeaderInformation"; @@ -7,12 +7,11 @@ import { getUserHeaderInformation } from "../../../helpers/http/userHeader/getUs export const googleCallbackController = async ( ctx: Context & { query: { code: string; state: string } } ) => { - return ctx; try { const userHeaderInfo = getUserHeaderInformation(ctx); const userData = await googleCallbackService(ctx.query, userHeaderInfo); - return returnWriteResponse( + return returnReadResponse( ctx.set, 200, "Authenticated successfully!",