Skip to content

OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.

fix: read issues

Carl-Gerhard Lindesvärd13d8b92cf3f4
diff --git a/packages/trpc/src/routers/widget.ts b/packages/trpc/src/routers/widget.ts
index ff43a31fa..ad0f5a9fe 100644
--- a/packages/trpc/src/routers/widget.ts
+++ b/packages/trpc/src/routers/widget.ts
@@ -23,7 +23,7 @@ const uid = new ShortUniqueId({ length: 6 });
// Helper to find widget by projectId and type
async function findWidgetByType(projectId: string, type: string) {
- const widgets = await db.shareWidget.findMany({
+ const widgets = await db.$primary().shareWidget.findMany({
where: { projectId },
});
return widgets.find(