diff --git a/src/routes/api.ts b/src/routes/api.ts index 1a133cd..b6aeac2 100644 --- a/src/routes/api.ts +++ b/src/routes/api.ts @@ -38,14 +38,12 @@ export async function fetchArticlesApi( since: `${pageQuery.since}`, page: `${pageQuery.page}` }); - // console.log(`Entries params: ${entriesQueryParams}`); if (USE_REDIS_CACHE) { const cached = await redis.get(entriesQueryParams.toString()); if (cached) { const response = JSON.parse(cached); - // console.log('Cache hit!'); const ttl = await redis.ttl(entriesQueryParams.toString()); return { ...response, cacheControl: `max-age=${ttl}` }; @@ -84,14 +82,7 @@ export async function fetchArticlesApi( const { _embedded, page, pages, total, limit } = await pageResponse.json(); const articles: Article[] = []; - // do { - // nbEntries += entries._embedded.items.length; - // console.log(`number of articles fetched: ${_embedded.items.length}`); _embedded.items.forEach((article: WallabagArticle) => { - // if (articles?.length === +WALLABAG_MAX_ARTICLES) { - // console.log('Reached 30 articles'); - // return; - // } const rawTags = article?.tags?.map((tag) => tag.slug); if (intersect(rawTags, Object.values(ArticleTag))?.length > 0) { const tags = rawTags.map((rawTag) => rawTag as unknown as ArticleTag); diff --git a/src/routes/og/+server.ts b/src/routes/og/+server.ts index 76eaa60..2aeb469 100644 --- a/src/routes/og/+server.ts +++ b/src/routes/og/+server.ts @@ -1,10 +1,5 @@ import type { RequestHandler } from '@sveltejs/kit'; -import satori from 'satori'; -import { Resvg } from '@resvg/resvg-js'; -import { html as toReactNode } from 'satori-html'; -import FiraSansSemiBold from '$lib/fonts/FiraSans-SemiBold.ttf'; import SocialImageCard from '$lib/components/socialImageCard.svelte'; -import { dev } from '$app/environment'; import { componentToPng } from '$root/lib/renderImage'; const height = 630;