mirror of
https://github.com/documenso/documenso.git
synced 2026-08-23 06:42:21 +10:00
fix(trpc): map v2 field update coordinates to service names
- ZUpdateEnvelopeFieldsRequestSchema accepts page/positionX/positionY but the service consumes pageNumber/pageX/pageY, so position updates via POST /envelope/field/update-many were silently dropped; map the names in the route before calling updateEnvelopeFields - docs: show Decimal coordinates as serialized strings in field responses - docs: include the defaulted fieldMeta values returned when the request omits fieldMeta - docs: use real envelope/envelope-item ID formats in samples
This commit is contained in:
@@ -29,7 +29,17 @@ export const updateEnvelopeFieldsRoute = authenticatedProcedure
|
||||
id: envelopeId,
|
||||
},
|
||||
type: null,
|
||||
fields,
|
||||
fields: fields.map((field) => ({
|
||||
id: field.id,
|
||||
type: field.type,
|
||||
pageNumber: field.page,
|
||||
pageX: field.positionX,
|
||||
pageY: field.positionY,
|
||||
width: field.width,
|
||||
height: field.height,
|
||||
fieldMeta: field.fieldMeta,
|
||||
envelopeItemId: field.envelopeItemId,
|
||||
})),
|
||||
requestMetadata: ctx.metadata,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user