From e05e98a34defa6eb252c6f002f081c45f1cc208f Mon Sep 17 00:00:00 2001 From: Paulo Endoh Date: Mon, 11 Nov 2024 20:01:42 -0300 Subject: [PATCH] google login -- error [clni503px000eyr0kizrhem11] --- src/domains/auth/AuthService.ts | 16 +++++++++++----- .../lolrates/lolRates/LolRatesController.ts | 4 ++-- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/domains/auth/AuthService.ts b/src/domains/auth/AuthService.ts index d61afe1..e7b2757 100644 --- a/src/domains/auth/AuthService.ts +++ b/src/domains/auth/AuthService.ts @@ -220,13 +220,19 @@ export class AuthService { expiresAt: addMinutes(new Date(), 15).toISOString(), }) - return ( + const encoded = encodeURI( process.env.CLIENT_BASE_URL + - "?oauthToken=" + - oauthToken.token + - "&userId=" + - oauthToken.userId + "?oauthToken=" + + oauthToken.token + + "&userId=" + + oauthToken.userId ) + + console.log({ + encoded, + }) + + return encoded } async loginWithUserIdAndGoogleToken(body: UserTokenPostDto) { diff --git a/src/domains/lolrates/lolRates/LolRatesController.ts b/src/domains/lolrates/lolRates/LolRatesController.ts index 6dc366e..57c7daf 100644 --- a/src/domains/lolrates/lolRates/LolRatesController.ts +++ b/src/domains/lolrates/lolRates/LolRatesController.ts @@ -5,8 +5,8 @@ import { LolRatesService } from "./LolRatesService" @JsonController() export class LolRatesController { constructor( - private lolRateRepo = LolRateRepository, - private lolratesService = new LolRatesService() + private readonly lolRateRepo = LolRateRepository, + private readonly lolratesService = new LolRatesService() ) {} @Get("/lolRates")