From b2b6d16f7f1eaca7b953cdc5609b19818c455911 Mon Sep 17 00:00:00 2001 From: betich Date: Sun, 16 Jun 2024 17:46:34 +0700 Subject: [PATCH] feat: airtable integration --- package.json | 3 ++- src/Handlers/airtable.ts | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 7171edd..4e26980 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,8 @@ "type": "module", "version": "0.0.1", "private": true, - "packageManager": "pnpm@8.6.0", + "packageManager": "pnpm@9.0.6", + "package-manager-strict": false, "scripts": { "dev": "astro dev", "start": "astro dev", diff --git a/src/Handlers/airtable.ts b/src/Handlers/airtable.ts index db120e0..d8ab506 100644 --- a/src/Handlers/airtable.ts +++ b/src/Handlers/airtable.ts @@ -1,6 +1,6 @@ import Airtable from "airtable"; -const apiKey = import.meta.env.AIRTABLE_API_KEY; +const apiPat = import.meta.env.AIRTABLE_API_PAT; const airtableMock = (() => { return { @@ -10,8 +10,8 @@ const airtableMock = (() => { }) as unknown as ReturnType; export const base = - import.meta.env.MODE !== "development" || apiKey - ? new Airtable({ apiKey: import.meta.env.AIRTABLE_API_KEY }).base( + import.meta.env.MODE !== "development" || apiPat + ? new Airtable({ apiKey: import.meta.env.AIRTABLE_API_PAT }).base( import.meta.env.AIRTABLE_BASE_ID ) : airtableMock;