From 22c3e665e8005d509b143a8c142c70ffac4bbffd Mon Sep 17 00:00:00 2001 From: ld3zian <42660576+ld3z@users.noreply.github.com> Date: Tue, 4 Feb 2025 19:17:28 -0700 Subject: [PATCH] fix errors --- package-lock.json | 14 ++++++++++++++ package.json | 3 ++- src/lib/api.ts | 4 ++-- src/lib/db.ts | 1 + 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2fb8090..6875c3a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "@astrojs/tailwind": "^6.0.0", "@astrojs/vercel": "^8.0.5", "@floating-ui/dom": "^1.6.13", + "@types/node": "^22.13.1", "@vercel/analytics": "^1.4.1", "@vercel/kv": "^3.0.0", "astro": "^5.2.3", @@ -1462,6 +1463,14 @@ "@types/unist": "*" } }, + "node_modules/@types/node": { + "version": "22.13.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.1.tgz", + "integrity": "sha512-jK8uzQlrvXqEU91UxiK5J7pKHyzgnI1Qnl0QDHIgVGuolJhRb9EEl28Cj9b3rGR8B2lhFCtvIm5os8lFnO/1Ew==", + "dependencies": { + "undici-types": "~6.20.0" + } + }, "node_modules/@types/unist": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", @@ -5811,6 +5820,11 @@ "resolved": "https://registry.npmjs.org/uncrypto/-/uncrypto-0.1.3.tgz", "integrity": "sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==" }, + "node_modules/undici-types": { + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==" + }, "node_modules/unenv": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/unenv/-/unenv-1.10.0.tgz", diff --git a/package.json b/package.json index 5cdfcf9..bf24688 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "@astrojs/tailwind": "^6.0.0", "@astrojs/vercel": "^8.0.5", "@floating-ui/dom": "^1.6.13", + "@types/node": "^22.13.1", "@vercel/analytics": "^1.4.1", "@vercel/kv": "^3.0.0", "astro": "^5.2.3", @@ -22,4 +23,4 @@ "ioredis": "^5.4.2", "tailwindcss": "^3.4.1" } -} \ No newline at end of file +} diff --git a/src/lib/api.ts b/src/lib/api.ts index 1692838..f8aca7a 100644 --- a/src/lib/api.ts +++ b/src/lib/api.ts @@ -355,8 +355,8 @@ export async function getChaptersForSlugs( ); } -// Add this new validation function -async function validateSlugs(slugs: string[]): Promise { +// Add export to the validation function +export async function validateSlugs(slugs: string[]): Promise { const validSlugs: string[] = []; const invalidSlugs: string[] = []; diff --git a/src/lib/db.ts b/src/lib/db.ts index a25297a..5710029 100644 --- a/src/lib/db.ts +++ b/src/lib/db.ts @@ -1,5 +1,6 @@ import Redis from 'ioredis'; import type { FeedMapping } from './types'; +import { getChaptersForSlugs } from './api'; const REDIS_URL = import.meta.env.REDIS_URL || process.env.REDIS_URL; let redisClient: Redis | null = null;