fix: template router update

This commit is contained in:
Mythie
2024-02-26 10:31:24 +11:00
parent c7dac2f4de
commit 6b8e11b535
3 changed files with 4 additions and 1 deletions

View File

@ -41,7 +41,7 @@ export const templateRouter = router({
.input(ZCreateDocumentFromTemplateMutationSchema)
.mutation(async ({ input, ctx }) => {
try {
const { templateId } = input;
const { templateId, teamId } = input;
const limits = await getServerLimits({ email: ctx.user.email });
@ -51,6 +51,7 @@ export const templateRouter = router({
return await createDocumentFromTemplate({
templateId,
teamId,
userId: ctx.user.id,
});
} catch (err) {