Skip to content

Commit ff28162

Browse files
fix: MKT-14048 revert apdater changes
1 parent 3043fa5 commit ff28162

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

src/utils/adapter.ts

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,11 @@ import { axiosToFetchResponse, fetchToAxiosConfig } from "./utils";
1616
export const dispatchAdapter =
1717
(postRobot: typeof PostRobot) =>
1818
(
19-
config: AxiosRequestConfig,
20-
context?: { installationUID: string; extensionUID: string }
19+
config: AxiosRequestConfig
2120
) => {
2221
return new Promise((resolve, reject) => {
2322
postRobot
24-
.sendToParent("apiAdapter", {
25-
data: config,
26-
extension: context,
27-
})
23+
.sendToParent("apiAdapter", config)
2824
.then((event: unknown) => {
2925
const { data: response } = event as { data: AxiosResponse };
3026

@@ -63,14 +59,12 @@ export const dispatchAdapter =
6359
*/
6460
export const dispatchApiRequest = async (
6561
url: string,
66-
options?: RequestInit,
67-
context?: { installationUID: string; extensionUID: string }
62+
options?: RequestInit
6863
): Promise<Response> => {
6964
try {
7065
const config = fetchToAxiosConfig(url, options);
7166
const axiosResponse = (await dispatchAdapter(PostRobot)(
72-
config,
73-
context
67+
config
7468
)) as AxiosResponse;
7569

7670
return axiosToFetchResponse(axiosResponse);

0 commit comments

Comments
 (0)