Skip to content

Commit

Permalink
PREAPPS-8073 using the document name coming from server
Browse files Browse the repository at this point in the history
  • Loading branch information
damini-vashishtha authored and miteshsavani810 committed Nov 7, 2024
1 parent 994c7b5 commit dfc4581
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/batch-client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1460,14 +1460,10 @@ export class ZimbraBatchClient {
const versionIds = data.documents.map((doc: any) => doc.version);
const maxVersion = Math.max(...versionIds);
const latestDocumentVersion = data.documents.find((doc: any) => doc.version === maxVersion);
const versionDocuments = data.documents.map((versionDoc: any) => ({
...versionDoc,
name: latestDocumentVersion.name
}));

return {
...latestDocumentVersion,
docs: versionDocuments
docs: data.documents
};
});

Expand Down

0 comments on commit dfc4581

Please sign in to comment.