fix: resolve ts errors for build and cleanup widget partners action

This commit is contained in:
AyrisAI
2026-07-13 14:25:28 +03:00
parent 53cbee0841
commit f37d2b4c39
6 changed files with 37 additions and 176 deletions
+4 -6
View File
@@ -47,7 +47,7 @@ async function main() {
console.log('Mekanlar ekleniyor...')
const listings = await mockDb.getListings() // Default is 100 limit, mockDb returns all for seed if not paginated
// Let's ensure we get all
const allListings = await mockDb.getListings({ limit: 1000 })
const allListings = await mockDb.getListings()
for (const listing of allListings) {
await prisma.listing.upsert({
where: { id: listing.id },
@@ -82,10 +82,8 @@ async function main() {
hasWidgetInstalled: listing.hasWidgetInstalled,
widgetSiteUrl: listing.widgetSiteUrl,
images: {
create: listing.images?.map(img => ({
id: img.id,
url: img.url,
createdAt: img.createdAt
create: listing.images?.map((img: any) => ({
url: typeof img === 'string' ? img : img.url
})) || []
}
},
@@ -135,7 +133,7 @@ async function main() {
descriptionRu: col.descriptionRu,
coverImage: col.coverImage,
listings: {
connect: col.listingIds?.map(id => ({ id })) || []
connect: (col as any).listingIds?.map((id: string) => ({ id })) || []
}
}
})