Latest status

This commit is contained in:
mbaharip
2023-04-29 23:17:09 +07:00
parent c3318a4fd2
commit 4250bceffa
6 changed files with 202 additions and 22 deletions
+6
View File
@@ -1,6 +1,7 @@
import apiConfig from "@config/api.config";
import { google, drive_v3 } from "googleapis";
import { decrypt } from "@utils/encryptionHelper";
import { Redis } from "@upstash/redis";
const decryptedSecret: string = decrypt(
apiConfig.client_secret,
@@ -11,6 +12,11 @@ const decryptedRefreshToken: string = decrypt(
process.env.ENCRYPTION_KEY as string,
);
export const redis = new Redis({
url: process.env.REDIS_HOST as string,
token: process.env.REDIS_TOKEN as string,
});
const oauth2Client = new google.auth.OAuth2(
apiConfig.client_id,
decryptedSecret,