fix(core): update

This commit is contained in:
2021-05-16 23:59:47 +00:00
parent 217724d836
commit c8dc59cdf2
4 changed files with 24 additions and 11 deletions

View File

@@ -46,12 +46,16 @@ export class GitlabAccount {
for (const link of links) {
linkObjects.push({
original: link,
link: findLinkName(link)
link: findLinkName(link),
});
}
const next = linkObjects.find(linkObject => linkObject.original.includes('rel="next"'));
const next = linkObjects.find((linkObject) => linkObject.original.includes('rel="next"'));
if (next && response.body instanceof Array) {
const nextResponse = await this.request(methodArg, next.link.replace('https://gitlab.com/api/v4', ''), {});
const nextResponse = await this.request(
methodArg,
next.link.replace('https://gitlab.com/api/v4', ''),
{}
);
response.body = response.body.concat(nextResponse);
}
}