From 9e5118d1dc2567e9f182a6d818fd821f12d5d24f Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Thu, 13 Jun 2024 23:11:40 -0300 Subject: [PATCH] remove zod schema --- src/main/events/helpers/validators.ts | 5 ----- src/main/services/hydra-api.ts | 4 +--- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/main/events/helpers/validators.ts b/src/main/events/helpers/validators.ts index e3163aff..f3c9d844 100644 --- a/src/main/events/helpers/validators.ts +++ b/src/main/events/helpers/validators.ts @@ -12,8 +12,3 @@ export const downloadSourceSchema = z.object({ }) ), }); - -export const refreshTokenSchema = z.object({ - accessToken: z.string(), - expiresIn: z.number(), -}); diff --git a/src/main/services/hydra-api.ts b/src/main/services/hydra-api.ts index 776021ea..56caab8b 100644 --- a/src/main/services/hydra-api.ts +++ b/src/main/services/hydra-api.ts @@ -36,9 +36,7 @@ export class HydraApi { refreshToken: this.userAuth.refreshToken, }); - const { accessToken, expiresIn } = refreshTokenSchema.parse( - response.data - ); + const { accessToken, expiresIn } = response.data; const tokenExpirationTimestamp = now.getTime() + expiresIn - this.EXPIRATION_OFFSET_IN_MS;