mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 00:03:33 +10:00
feat: allow switching document when using templates (#1571)
Adds the ability to upload a custom document when using a template. This is useful when you have a given fixed template with placeholder values that you want to decorate with Documenso fields but will then create a final specialised document when sending it out to a given recipient.
This commit is contained in:
@ -237,8 +237,8 @@ export const templateRouter = router({
|
||||
})
|
||||
.input(ZCreateDocumentFromTemplateMutationSchema)
|
||||
.output(ZGetDocumentWithDetailsByIdResponseSchema)
|
||||
.mutation(async ({ input, ctx }) => {
|
||||
const { templateId, teamId, recipients, distributeDocument } = input;
|
||||
.mutation(async ({ ctx, input }) => {
|
||||
const { templateId, teamId, recipients, distributeDocument, customDocumentDataId } = input;
|
||||
|
||||
const limits = await getServerLimits({ email: ctx.user.email, teamId });
|
||||
|
||||
@ -253,6 +253,7 @@ export const templateRouter = router({
|
||||
teamId,
|
||||
userId: ctx.user.id,
|
||||
recipients,
|
||||
customDocumentDataId,
|
||||
requestMetadata,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user