From 7f234cf3219456a22ae31cab4a9d89f9121ca7f9 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Sun, 3 Mar 2024 16:00:01 -0800 Subject: [PATCH] evert "test: netlify blobs" This reverts commit 64fc1c0f9b51646466f2b10e9c106184a02b8c7d. --- src/_data/links.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/_data/links.js b/src/_data/links.js index af8af29c..be35bbf7 100644 --- a/src/_data/links.js +++ b/src/_data/links.js @@ -1,4 +1,4 @@ -import { getStore, getDeployStore } from "@netlify/blobs"; +import { getStore } from "@netlify/blobs"; import EleventyFetch from '@11ty/eleventy-fetch' // import { S3Client, GetObjectCommand, PutObjectCommand } from '@aws-sdk/client-s3' @@ -16,7 +16,7 @@ const filterDuplicates = array => { return array.filter(obj => !seenIds.has(obj.id) && seenIds.add(obj.id)); }; -export default async function ({ constants }) { +export default async function () { // const client = new S3Client({ // credentials: { // accessKeyId: process.env.ACCESS_KEY_B2, @@ -50,11 +50,7 @@ export default async function ({ constants }) { let cachedLinks; if (process.env.ELEVENTY_PRODUCTION) { - const store = getDeployStore({ - siteID: constants.SITE_ID, - token: constants.NETLIFY_API_TOKEN, - }); - READWISE_LINKS_STORE = await store.getStore("readwise-links"); + READWISE_LINKS_STORE = getStore("readwise-links"); await READWISE_LINKS_STORE.get('cached-links'); }