added opinions
This commit is contained in:
@@ -5,6 +5,7 @@ import { z } from "zod";
|
|||||||
export const infoRoute = router({
|
export const infoRoute = router({
|
||||||
getAllProvinces: publicProcedure.query(getProvinces),
|
getAllProvinces: publicProcedure.query(getProvinces),
|
||||||
getAllGroups: publicProcedure.query(getGroups),
|
getAllGroups: publicProcedure.query(getGroups),
|
||||||
|
getAllOpinions: publicProcedure.query(getOpinions),
|
||||||
getAllZones: publicProcedure
|
getAllZones: publicProcedure
|
||||||
.input(z.object({ provice_id: z.number().optional() }))
|
.input(z.object({ provice_id: z.number().optional() }))
|
||||||
.query(async ({ input }) => await getZone(input.provice_id)),
|
.query(async ({ input }) => await getZone(input.provice_id)),
|
||||||
@@ -28,3 +29,7 @@ async function getZone(province?: number) {
|
|||||||
async function getGroups() {
|
async function getGroups() {
|
||||||
return await db.query.group.findMany();
|
return await db.query.group.findMany();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function getOpinions() {
|
||||||
|
return await db.query.opinion.findMany();
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user