-
- Invia email con annunci selezionati
-
+
Invalidate Redis Cache
+
Current Cache Stats:
+ {data?.success ? (
+
+ - Pdf Schede Annuncio: {data?.schedaCount}
+ - Pdf Condizioni: {data?.condizioniCount}
+
+ ) : (
+
Error fetching cache stats
+ )}
-
-
- setEmail(e.target.value)}
- placeholder="Inserisci l'indirizzo email"
- type="email"
- value={email || ""}
- />
-
-
- {loading ? (
-
- ) : (
-
-
- {
- setSelectedAnnunci(
- value.map((v) => ({
- label: v.label,
- value: parseInt(v.value) as AnnunciId,
- })),
- );
- }}
- options={
- codici?.map((cod) => ({
- label: cod.codice,
- value: cod.id.toString(),
- })) || []
- }
- placeholder=""
- />
-
- )}
-
-
+
);
};
diff --git a/apps/infoalloggi/src/server/api/routers/annunci.ts b/apps/infoalloggi/src/server/api/routers/annunci.ts
index 416828d..4139e39 100644
--- a/apps/infoalloggi/src/server/api/routers/annunci.ts
+++ b/apps/infoalloggi/src/server/api/routers/annunci.ts
@@ -26,9 +26,12 @@ import {
} from "~/server/controllers/annunci.controller";
import { db } from "~/server/db";
import { NewMail } from "~/server/services/mailer";
-import { genPdfSchedaAnnuncio } from "~/server/services/puppeteer.service";
+import {
+ genPdfSchedaAnnuncio,
+ invalidateCache,
+ SCHEDA_ANNUNCIO_CACHE_PREFIX,
+} from "~/server/services/puppeteer.service";
import { zAnnuncioId, zServizioId } from "~/server/utils/zod_types";
-import { getKeydbClient } from "~/utils/keydb";
export const annunciRouter = createTRPCRouter({
editAnnuncio: adminProcedure
@@ -36,10 +39,10 @@ export const annunciRouter = createTRPCRouter({
z.object({ annuncioId: zAnnuncioId, data: z.custom