From b72e87ffd2ce95b6dc45ea8f24f48e595207e629 Mon Sep 17 00:00:00 2001 From: Ayo Date: Fri, 8 Aug 2025 21:32:23 +0200 Subject: [PATCH] refactor: fix types --- src/pages/index.astro | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/index.astro b/src/pages/index.astro index 6fa5371..4d8696a 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,6 +1,7 @@ --- -import { createClient } from 'redis' +import { createClient, type RedisJSON } from 'redis' import { type ArticleData, extract } from '@extractus/article-extractor' + import SimpleAddressBar from '../components/SimpleAddressBar.astro' import Post from '../components/Post.astro' import App from '../layouts/App.astro' @@ -31,7 +32,7 @@ if (url && url !== '/' && url !== '') { console.log('>>> Using fetched content', article?.url) if (article !== null) { // cache via redis - await client.json.set('cozy:url:' + url, '$', article) + await client.json.set('cozy:url:' + url, '$', article as RedisJSON) console.log('>>> Added to cache', article.url) } } catch {