Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
alireza-sharifpour committed Oct 14, 2024
1 parent a906ae5 commit c096b94
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/server/api/routers/graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)[]
)
)
);
Expand All @@ -44,7 +45,7 @@ export const graphRouter = createTRPCRouter({
),
inArray(
links.type,
selectedLinkTypes as Array<(typeof links.type.enumValues)[number]>
selectedLinkTypes as (typeof NodeLinkType.FarcasterConnection)[]
)
)
);
Expand Down

0 comments on commit c096b94

Please sign in to comment.