Remove commented out code.

This commit is contained in:
Bradley Shellnut 2023-12-10 17:09:53 -08:00
parent 17b5325ec4
commit 6013181aa1
2 changed files with 0 additions and 14 deletions

View file

@ -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);

View file

@ -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;