chore(*): use prettier for formatting
This commit is contained in:
parent
6c659fe1d0
commit
029caaaa9e
73 changed files with 1390 additions and 794 deletions
|
@ -1,29 +1,26 @@
|
|||
import EleventyFetch from "@11ty/eleventy-fetch";
|
||||
import EleventyFetch from '@11ty/eleventy-fetch';
|
||||
|
||||
const { POSTGREST_URL, POSTGREST_API_KEY } = process.env;
|
||||
|
||||
export default async function () {
|
||||
try {
|
||||
const data = await EleventyFetch(
|
||||
`${POSTGREST_URL}/optimized_recent_activity`,
|
||||
{
|
||||
duration: "1h",
|
||||
type: "json",
|
||||
fetchOptions: {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Authorization: `Bearer ${POSTGREST_API_KEY}`,
|
||||
},
|
||||
},
|
||||
const data = await EleventyFetch(`${POSTGREST_URL}/optimized_recent_activity`, {
|
||||
duration: '1h',
|
||||
type: 'json',
|
||||
fetchOptions: {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: `Bearer ${POSTGREST_API_KEY}`
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
const feeds = data?.[0]?.feed || [];
|
||||
|
||||
return feeds.filter((item) => item !== null);
|
||||
} catch (error) {
|
||||
console.error("Error fetching recent activity:", error);
|
||||
console.error('Error fetching recent activity:', error);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue