Skip to content

Commit 4b037cc

Browse files
committed
modify operation id in before request
1 parent 6a97df0 commit 4b037cc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/hooks/custom/SplitPdfHook.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import async from "async";
2+
import { v4 as uuidv4 } from 'uuid';
23

34
import {
45
AfterErrorContext,
@@ -96,7 +97,8 @@ export class SplitPdfHook
9697
hookCtx: BeforeRequestContext,
9798
request: Request
9899
): Promise<Request> {
99-
const { operationID } = hookCtx;
100+
const operationID = "partition-" + uuidv4();
101+
hookCtx.operationID = operationID;
100102
const requestClone = request.clone();
101103
const formData = await requestClone.formData();
102104
const splitPdfPage = stringToBoolean(

0 commit comments

Comments
 (0)