mirror of
https://github.com/documenso/documenso.git
synced 2025-11-14 16:51:38 +10:00
fix: use enum for type
This commit is contained in:
@ -1,6 +1,7 @@
|
|||||||
import type { z } from 'zod';
|
import type { z } from 'zod';
|
||||||
|
|
||||||
import { prisma } from '@documenso/prisma';
|
import { prisma } from '@documenso/prisma';
|
||||||
|
import { FolderType } from '@documenso/prisma/generated/types';
|
||||||
import { TemplateSchema } from '@documenso/prisma/generated/zod/modelSchema//TemplateSchema';
|
import { TemplateSchema } from '@documenso/prisma/generated/zod/modelSchema//TemplateSchema';
|
||||||
import type { TCreateTemplateMutationSchema } from '@documenso/trpc/server/template-router/schema';
|
import type { TCreateTemplateMutationSchema } from '@documenso/trpc/server/template-router/schema';
|
||||||
|
|
||||||
@ -50,7 +51,7 @@ export const createTemplate = async ({
|
|||||||
folder = await prisma.folder.findFirst({
|
folder = await prisma.folder.findFirst({
|
||||||
where: {
|
where: {
|
||||||
id: folderId,
|
id: folderId,
|
||||||
type: 'TEMPLATE',
|
type: FolderType.TEMPLATE,
|
||||||
...(teamId
|
...(teamId
|
||||||
? {
|
? {
|
||||||
team: {
|
team: {
|
||||||
|
|||||||
Reference in New Issue
Block a user