Skip to content

Commit

Permalink
feat: fix TS errors for all scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
IlanTSnyk committed Aug 1, 2022
1 parent 94a3e71 commit 6046129
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/lib/github-enterprise/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const fetchAllPages = async (
);
}
}
const apiResponse = await response.json() as string[];
const apiResponse = (await response.json()) as string[];
values = values.concat(apiResponse);
const nextPage = response.headers.get('link');
if (nextPage && nextPage?.includes('rel="next"')) {
Expand Down
4 changes: 2 additions & 2 deletions src/lib/github/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ export const fetchAllPages = async (
);
}
}
const apiResponse = await response.json();
values = values.concat(apiResponse) as string[];
const apiResponse = (await response.json()) as string[];
values = values.concat(apiResponse);
const nextPage = response.headers.get('link');
if (nextPage && nextPage?.includes('rel="next"')) {
const nextPageLink = nextPage
Expand Down
4 changes: 2 additions & 2 deletions src/lib/gitlab/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ export const fetchAllPages = async (
);
}
}
const apiResponse = await response.json();
values = values.concat(apiResponse) as string[];
const apiResponse = (await response.json()) as string[];
values = values.concat(apiResponse);
const nextPage = response.headers.get('link');
if (nextPage && nextPage?.includes('rel="next"')) {
const nextPageLink = nextPage
Expand Down

0 comments on commit 6046129

Please sign in to comment.