diff --git a/apps/scan/src/services/db/resources/origin.ts b/apps/scan/src/services/db/resources/origin.ts index 24eed68ee..a01259e12 100644 --- a/apps/scan/src/services/db/resources/origin.ts +++ b/apps/scan/src/services/db/resources/origin.ts @@ -62,13 +62,16 @@ export const upsertOrigin = async ( description: origin.description, favicon: origin.favicon, ogImages: { - create: origin.ogImages.map( + connectOrCreate: origin.ogImages.map( ({ url, height, width, title, description }) => ({ - url, - height, - width, - title, - description, + where: { url }, + create: { + url, + height, + width, + title, + description, + }, }) ), },