From c096b9455b0946899713a8f60c378ebe96a04983 Mon Sep 17 00:00:00 2001 From: alireza-sharifpour Date: Mon, 14 Oct 2024 14:47:38 +0330 Subject: [PATCH] fix types --- src/server/api/routers/graph.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/server/api/routers/graph.ts b/src/server/api/routers/graph.ts index 20520ac..bdc03f5 100644 --- a/src/server/api/routers/graph.ts +++ b/src/server/api/routers/graph.ts @@ -2,6 +2,7 @@ import { z } from "zod"; import { createTRPCRouter, publicProcedure } from "../trpc"; import { nodes, links } from "@/server/db/schema"; import { eq, and, inArray } from "drizzle-orm"; +import { NodeLinkType, NodeType } from "@/app/graph/types"; export const graphRouter = createTRPCRouter({ getGraphData: publicProcedure @@ -24,7 +25,7 @@ export const graphRouter = createTRPCRouter({ eq(nodes.networkId, networkId), inArray( nodes.type, - selectedNodeTypes as Array<(typeof nodes.type.enumValues)[number]> + selectedNodeTypes as (typeof NodeType.Citizen)[] ) ) ); @@ -44,7 +45,7 @@ export const graphRouter = createTRPCRouter({ ), inArray( links.type, - selectedLinkTypes as Array<(typeof links.type.enumValues)[number]> + selectedLinkTypes as (typeof NodeLinkType.FarcasterConnection)[] ) ) );