⚗️ Implement chat API
This commit is contained in:
1
apps/viewer/src/features/results/api/index.ts
Normal file
1
apps/viewer/src/features/results/api/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from './utils'
|
@ -0,0 +1,8 @@
|
||||
import prisma from '@/lib/prisma'
|
||||
import { ResultValues } from 'models'
|
||||
|
||||
export const getResultValues = async (resultId: string) =>
|
||||
(await prisma.result.findUnique({
|
||||
where: { id: resultId },
|
||||
include: { answers: true },
|
||||
})) as ResultValues | null
|
1
apps/viewer/src/features/results/api/utils/index.ts
Normal file
1
apps/viewer/src/features/results/api/utils/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from './getResultValues'
|
Reference in New Issue
Block a user