fix: resolve ts errors for build and cleanup widget partners action
This commit is contained in:
+4
-6
@@ -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 })) || []
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user