Update Prisma adapter and type annotations
Replaces usage of PrismaBetterSQLite3 with PrismaBetterSqlite3 for consistency and correct casing. Updates type annotations in several components and API router for improved type safety. Also adjusts PrismaClient import paths in db files.
This commit is contained in:
@@ -189,7 +189,7 @@ export const scriptsRouter = createTRPCRouter({
|
||||
}
|
||||
|
||||
// Enhance cards with category information and additional script data
|
||||
const cardsWithCategories = cards.map(card => {
|
||||
const cardsWithCategories = cards.map((card: ScriptCard) => {
|
||||
const script = scripts.find(s => s.slug === card.slug);
|
||||
const categoryNames: string[] = script?.categories?.map(id => categoryMap[id]).filter((name): name is string => typeof name === 'string') ?? [];
|
||||
|
||||
@@ -226,7 +226,7 @@ export const scriptsRouter = createTRPCRouter({
|
||||
|
||||
// Filter cards to only include scripts from enabled repositories
|
||||
// For backward compatibility, include scripts without repository_url
|
||||
const filteredCards = cardsWithCategories.filter(card => {
|
||||
const filteredCards = cardsWithCategories.filter((card: ScriptCard) => {
|
||||
const repoUrl = card.repository_url;
|
||||
|
||||
// If script has no repository_url, include it for backward compatibility
|
||||
|
||||
Reference in New Issue
Block a user