mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 08:13:56 +10:00
feat: update createFields api endpoint (#1311)
Allow users to add 1 or more fields to a document via the /document/<id>/fields API Endpoint.
This commit is contained in:
@ -37,6 +37,10 @@ export const updateField = async ({
|
||||
requestMetadata,
|
||||
fieldMeta,
|
||||
}: UpdateFieldOptions) => {
|
||||
if (type === 'FREE_SIGNATURE') {
|
||||
throw new Error('Cannot update a FREE_SIGNATURE field');
|
||||
}
|
||||
|
||||
const oldField = await prisma.field.findFirstOrThrow({
|
||||
where: {
|
||||
id: fieldId,
|
||||
|
||||
Reference in New Issue
Block a user