Skip to content

Commit c3ecbbc

Browse files
committed
Apply another suggestion
1 parent 6c63be5 commit c3ecbbc

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/v2/providers/dataconnect.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -324,17 +324,16 @@ function onOperation<Variables, ResponseData, PathPatternOrOptions>(
324324
operationPattern
325325
);
326326

327+
const { authtype, authid, ...rest } = event;
327328
const dataConnectEvent: DataConnectEvent<
328329
MutationEventData<Variables, ResponseData>,
329330
DataConnectParams<PathPatternOrOptions>
330331
> = {
331-
...event,
332-
authType: event.authtype,
333-
authId: event.authid,
332+
...rest,
333+
authType: authtype,
334+
authId: authid,
334335
params: params as DataConnectParams<PathPatternOrOptions>,
335336
};
336-
delete (dataConnectEvent as any).authtype;
337-
delete (dataConnectEvent as any).authid;
338337

339338
return wrapTraceContext(withInit(handler))(dataConnectEvent);
340339
};

0 commit comments

Comments
 (0)