omni_chat: consume receiver.flow and persist inbound telegram
This commit is contained in:
16
omni_chat/src/utils/prisma.ts
Normal file
16
omni_chat/src/utils/prisma.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { PrismaClient } from "@prisma/client";
|
||||
|
||||
declare global {
|
||||
// eslint-disable-next-line no-var
|
||||
var __omniChatPrisma: PrismaClient | undefined;
|
||||
}
|
||||
|
||||
export const prisma =
|
||||
globalThis.__omniChatPrisma ??
|
||||
new PrismaClient({
|
||||
log: ["error", "warn"],
|
||||
});
|
||||
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
globalThis.__omniChatPrisma = prisma;
|
||||
}
|
||||
Reference in New Issue
Block a user