2
0

🔊 Add prisma metrics to prometheus endpoint (#1420)

This commit is contained in:
Baptiste Arnaud
2024-04-06 15:08:57 +02:00
committed by GitHub
parent d96f384e02
commit 6e0388c501
9 changed files with 92 additions and 75 deletions

View File

@@ -1,4 +1,5 @@
import prisma from '@typebot.io/lib/prisma'
import { Prisma } from '@typebot.io/prisma'
import { SessionState } from '@typebot.io/schemas'
type Props = {
@@ -6,7 +7,10 @@ type Props = {
state: SessionState
}
export const updateSession = async ({ id, state }: Props) =>
export const updateSession = ({
id,
state,
}: Props): Prisma.PrismaPromise<any> =>
prisma.chatSession.updateMany({
where: { id },
data: {