Verified Commit b987cca7 authored by Birk Gustav Samson Stoveland's avatar Birk Gustav Samson Stoveland 💬
Browse files

hotfix: prettify

parent 78ef71fc
......@@ -57,16 +57,18 @@ export const getAllCommitsFromAPI = async () => {
};
const getMergeRequestsFromAPI = async (data: Array<MergeRequest>, page: number) => {
return fromAPI('/merge_requests?state=all&per_page=101000&&page=' + page, 'GET').then(async (res) => {
if (res.ok) {
data = data.concat(res.data as Array<MergeRequest>);
if (res.headers.get('x-next-page')) {
await getMergeRequestsFromAPI(data, page + 1);
} else {
return data;
return fromAPI('/merge_requests?state=all&per_page=101000&&page=' + page, 'GET').then(
async (res) => {
if (res.ok) {
data = data.concat(res.data as Array<MergeRequest>);
if (res.headers.get('x-next-page')) {
await getMergeRequestsFromAPI(data, page + 1);
} else {
return data;
}
}
}
});
},
);
};
export const getAllMergeRequestsFromAPI = async () => {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment