mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-03 08:43:48 +03:00
remove zod schema
This commit is contained in:
parent
7bbaae91c9
commit
9e5118d1dc
@ -12,8 +12,3 @@ export const downloadSourceSchema = z.object({
|
|||||||
})
|
})
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
|
|
||||||
export const refreshTokenSchema = z.object({
|
|
||||||
accessToken: z.string(),
|
|
||||||
expiresIn: z.number(),
|
|
||||||
});
|
|
||||||
|
@ -36,9 +36,7 @@ export class HydraApi {
|
|||||||
refreshToken: this.userAuth.refreshToken,
|
refreshToken: this.userAuth.refreshToken,
|
||||||
});
|
});
|
||||||
|
|
||||||
const { accessToken, expiresIn } = refreshTokenSchema.parse(
|
const { accessToken, expiresIn } = response.data;
|
||||||
response.data
|
|
||||||
);
|
|
||||||
|
|
||||||
const tokenExpirationTimestamp =
|
const tokenExpirationTimestamp =
|
||||||
now.getTime() + expiresIn - this.EXPIRATION_OFFSET_IN_MS;
|
now.getTime() + expiresIn - this.EXPIRATION_OFFSET_IN_MS;
|
||||||
|
Loading…
Reference in New Issue
Block a user