Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix(comments): reintroduce old procedure name for backwards compatibility (#3107)

marliessophie251be1a240ab
diff --git a/web/src/server/api/routers/comments.ts b/web/src/server/api/routers/comments.ts
index 7b0f966a0f..d9eb606d5e 100644
--- a/web/src/server/api/routers/comments.ts
+++ b/web/src/server/api/routers/comments.ts
@@ -209,6 +209,35 @@ export const commentsRouter = createTRPCRouter({
});
}
}),
+ // deprecated procedure, returns empty map, kept to prevent caching issues
+ getCountsByObjectIds: protectedProjectProcedure
+ .input(
+ z.object({
+ projectId: z.string(),
+ objectIds: z.array(z.string()),
+ objectType: z.nativeEnum(CommentObjectType),
+ }),
+ )
+ .query(async ({ input, ctx }) => {
+ try {
+ throwIfNoProjectAccess({
+ session: ctx.session,
+ projectId: input.projectId,
+ scope: "comments:read",
+ });
+
+ return new Map();
+ } catch (error) {
+ console.error(error);
+ if (error instanceof TRPCError) {
+ throw error;
+ }
+ throw new TRPCError({
+ code: "INTERNAL_SERVER_ERROR",
+ message: "Fetching comment count by object id failed.",
+ });
+ }
+ }),
getCountByObjectId: protectedProjectProcedure
.input(
z.object({