Compare commits

...

3 Commits

Author SHA1 Message Date
Joe Au-Yeung 5b475e3f4f
Merge branch 'main' into fix/remove-cred-parse 2023-10-16 10:05:55 -04:00
Joe Au-Yeung fca8a8fb7a
Merge branch 'main' into fix/remove-cred-parse 2023-10-13 10:28:11 -04:00
Joe Au-Yeung 71fbc21e02 Remove initial cred parse 2023-10-13 10:02:48 -04:00
1 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,6 @@
/* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/no-explicit-any */
import type { Prisma } from "@prisma/client"; import type { Prisma } from "@prisma/client";
import type { Credentials } from "google-auth-library";
import type { calendar_v3 } from "googleapis"; import type { calendar_v3 } from "googleapis";
import { google } from "googleapis"; import { google } from "googleapis";
@ -73,7 +74,9 @@ export default class GoogleCalendarService implements Calendar {
} }
private googleAuth = (credential: CredentialPayload) => { private googleAuth = (credential: CredentialPayload) => {
const googleCredentials = googleCredentialSchema.parse(credential.key); const googleCredentials = credential.key as Credentials;
if (!credential.key) throw new Error("Credential key is missing");
async function getGoogleAuth() { async function getGoogleAuth() {
const { client_id, client_secret, redirect_uris } = await getGoogleAppKeys(); const { client_id, client_secret, redirect_uris } = await getGoogleAppKeys();