Handle issues paging

This commit is contained in:
2019-12-05 14:44:33 +01:00
parent 1f3f4bdeed
commit e5eb2e0a7e
2 changed files with 13 additions and 4 deletions

View File

@ -8,8 +8,8 @@ export class GiteaUnauthorizedError extends Error {
export class GiteaClient {
fetchIssues(project) {
return fetch(`/gitea/api/v1/repos/${project}/issues`)
fetchIssues(project, page = 1) {
return fetch(`/gitea/api/v1/repos/${project}/issues?page=${page}`)
.then(this.assertAuthorization)
.then(res => res.json())
;