chore(syndication.js): remove unused data file
This commit is contained in:
parent
dbf3266e8d
commit
c4043bd812
3 changed files with 3 additions and 34 deletions
|
@ -1,31 +0,0 @@
|
|||
import EleventyFetch from "@11ty/eleventy-fetch";
|
||||
|
||||
const { POSTGREST_URL, POSTGREST_API_KEY } = process.env;
|
||||
|
||||
const fetchSyndication = async () => {
|
||||
try {
|
||||
const data = await EleventyFetch(
|
||||
`${POSTGREST_URL}/optimized_syndication`,
|
||||
{
|
||||
duration: "1h",
|
||||
type: "json",
|
||||
fetchOptions: {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Authorization: `Bearer ${POSTGREST_API_KEY}`,
|
||||
},
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
return data?.[0] || [];
|
||||
} catch (error) {
|
||||
console.error("Error fetching syndication data:", error);
|
||||
return [];
|
||||
}
|
||||
};
|
||||
|
||||
export default async function () {
|
||||
return await fetchSyndication();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue