- Deleted contact router and its associated mail functionality. - Removed addEvent mutation from event_queue router. - Cleaned up fatture router by removing createClient and getListClienti procedures. - Commented out deletePrezziario mutation in prezziario router. - Removed unused procedures in servizio router, including getServizioOrdini and getPreOnboardData. - Cleaned up stats router by removing commented-out code. - Updated stripe router to restrict health check to admin users and changed several public procedures to protected. - Commented out sync router procedures and related types. - Removed unused client-related functions in fic controller. - Cleaned up servizio controller by removing getServizioOrdini and commented-out code. - Refactored auth service to inline pwResetTokenFromMailHandler logic. - Commented out deletePrezziario function in prezziario service. - Cleaned up zod types by commenting out unused types. - Commented out getMessagesArray function in kysely helper.
30 lines
720 B
TypeScript
30 lines
720 B
TypeScript
import z from "zod";
|
|
import { createTRPCRouter, publicProcedure } from "~/server/api/trpc";
|
|
import {
|
|
getComuni,
|
|
getNazioni,
|
|
getProvincie,
|
|
searchComuniByCatasto,
|
|
} from "~/server/controllers/catasto.controller";
|
|
|
|
export const catastoRouter = createTRPCRouter({
|
|
getComuni: publicProcedure.query(async () => {
|
|
return await getComuni();
|
|
}),
|
|
searchComuniByCatasto: publicProcedure
|
|
.input(
|
|
z.object({
|
|
catasto: z.string().array(),
|
|
}),
|
|
)
|
|
.query(async ({ input }) => {
|
|
return await searchComuniByCatasto(input.catasto);
|
|
}),
|
|
|
|
getProvincie: publicProcedure.query(async () => {
|
|
return await getProvincie();
|
|
}),
|
|
getNazioni: publicProcedure.query(async () => {
|
|
return await getNazioni();
|
|
}),
|
|
});
|