fix: tRPC router type adjustments (celulares, red)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { z } from 'zod'
|
||||
import { TRPCError } from '@trpc/server'
|
||||
import { TipoDispositivo } from '@prisma/client'
|
||||
import { router, protectedProcedure, adminProcedure } from '../trpc'
|
||||
import { HeadwindClient } from '@/server/services/headwind/client'
|
||||
|
||||
@@ -19,7 +20,7 @@ export const celularesRouter = router({
|
||||
const { clienteId, estado, search, page = 1, limit = 20 } = input || {}
|
||||
|
||||
const where = {
|
||||
tipo: { in: ['CELULAR', 'TABLET'] as const },
|
||||
tipo: { in: ['CELULAR', 'TABLET'] as TipoDispositivo[] },
|
||||
...(ctx.user.clienteId ? { clienteId: ctx.user.clienteId } : {}),
|
||||
...(clienteId ? { clienteId } : {}),
|
||||
...(estado ? { estado } : {}),
|
||||
|
||||
Reference in New Issue
Block a user