mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 08:13:56 +10:00
19 lines
400 B
TypeScript
19 lines
400 B
TypeScript
import type { DocumentDataType } from '@prisma/client';
|
|
|
|
import { prisma } from '@documenso/prisma';
|
|
|
|
export type CreateDocumentDataOptions = {
|
|
type: DocumentDataType;
|
|
data: string;
|
|
};
|
|
|
|
export const createDocumentData = async ({ type, data }: CreateDocumentDataOptions) => {
|
|
return await prisma.documentData.create({
|
|
data: {
|
|
type,
|
|
data,
|
|
initialData: data,
|
|
},
|
|
});
|
|
};
|