fix errors

This commit is contained in:
ld3zian 2025-02-04 19:17:28 -07:00
parent 0daac66b26
commit 22c3e665e8
4 changed files with 19 additions and 3 deletions

14
package-lock.json generated
View file

@ -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",

View file

@ -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"
}
}
}

View file

@ -355,8 +355,8 @@ export async function getChaptersForSlugs(
);
}
// Add this new validation function
async function validateSlugs(slugs: string[]): Promise<string[]> {
// Add export to the validation function
export async function validateSlugs(slugs: string[]): Promise<string[]> {
const validSlugs: string[] = [];
const invalidSlugs: string[] = [];

View file

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