refactor: generate randomId in createDocument and createTemplate API

This commit is contained in:
prafull-opensignlabs
2024-02-03 18:55:23 +05:30
parent c115c7c757
commit f9e59905b7
2 changed files with 4 additions and 4 deletions
@@ -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,
};