mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-09-10 03:37:40 +02:00
refactor: generate randomId in createDocument and createTemplate API
This commit is contained in:
@@ -119,7 +119,7 @@ export default async function createDocumentwithCoordinate(request, response) {
|
||||
xPosition: widget.x,
|
||||
yPosition: widget.y,
|
||||
isStamp: widget.type === 'stamp',
|
||||
key: Math.floor(Math.random() * 10000),
|
||||
key: randomId(),
|
||||
isDrag: false,
|
||||
firstXPos: widget.x,
|
||||
firstYPos: widget.y,
|
||||
@@ -147,7 +147,7 @@ export default async function createDocumentwithCoordinate(request, response) {
|
||||
signerObjId: signer?.contactPtr?.objectId,
|
||||
signerPtr: signer?.contactPtr,
|
||||
Role: signer.role,
|
||||
Id: 3000 + index * 1000,
|
||||
Id: randomId(),
|
||||
blockColor: color[signer?.index],
|
||||
placeHolder,
|
||||
};
|
||||
|
||||
@@ -124,7 +124,7 @@ export default async function createTemplatewithCoordinate(request, response) {
|
||||
xPosition: widget.x,
|
||||
yPosition: widget.y,
|
||||
isStamp: widget.type === 'stamp',
|
||||
key: Math.floor(Math.random() * 10000),
|
||||
key: randomId(),
|
||||
isDrag: false,
|
||||
firstXPos: widget.x,
|
||||
firstYPos: widget.y,
|
||||
@@ -152,7 +152,7 @@ export default async function createTemplatewithCoordinate(request, response) {
|
||||
signerObjId: signer?.contactPtr?.objectId,
|
||||
signerPtr: signer?.contactPtr,
|
||||
Role: signer.role,
|
||||
Id: 3000 + index * 1000,
|
||||
Id: randomId(),
|
||||
blockColor: color[signer?.index],
|
||||
placeHolder,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user