diff --git a/apps/infoalloggi/src/server/controllers/annunci.controller.ts b/apps/infoalloggi/src/server/controllers/annunci.controller.ts index d734eef..3c07fa3 100644 --- a/apps/infoalloggi/src/server/controllers/annunci.controller.ts +++ b/apps/infoalloggi/src/server/controllers/annunci.controller.ts @@ -1,6 +1,6 @@ import type { Annunci, AnnunciId } from "~/schemas/public/Annunci"; import { TRPCError } from "@trpc/server"; -import { createSrc, createSrcset } from "~/server/services/imageServer"; +import { createSrcset } from "~/server/services/imageServer"; import { AnnuncioObjectWithImages } from "~/server/services/annunci.service"; import { zAnnuncioId } from "~/server/utils/zod_types"; import { z } from "zod/v4"; @@ -93,7 +93,7 @@ export const getAnnunciMetaByCod = async ({ cod }: { cod: string }) => { try { const annuncio = await db .selectFrom("annunci") - .select(["titolo_it", "desc_it", "url_immagini", "og_url"]) + .select(["titolo_it", "desc_it", "og_url"]) .where("annunci.web", "=", true) .where("codice", "=", cod) .executeTakeFirst(); @@ -105,10 +105,7 @@ export const getAnnunciMetaByCod = async ({ cod }: { cod: string }) => { } return { - ogImage: - annuncio.url_immagini && annuncio.url_immagini[0] - ? createSrc(annuncio.url_immagini[0]) - : annuncio.og_url || "", + ogImage: annuncio.og_url || "", title: annuncio.titolo_it || "", description: annuncio.desc_it || "", ogUrl: env.NEXT_PUBLIC_BASE_URL + "/annuncio/" + cod,