diff --git a/pinry-spa/src/components/Boards.vue b/pinry-spa/src/components/Boards.vue index 952f69a..c7fda3b 100644 --- a/pinry-spa/src/components/Boards.vue +++ b/pinry-spa/src/components/Boards.vue @@ -205,7 +205,7 @@ export default { return; } this.status.loading = true; - const promise = API.fetchBoardForUser(this.boardUsername); + const promise = API.fetchBoardForUser(this.boardUsername, this.status.offset); promise.then( (resp) => { const { results, next } = resp.data; diff --git a/pinry-spa/src/components/api.js b/pinry-spa/src/components/api.js index 9157d17..3e07936 100644 --- a/pinry-spa/src/components/api.js +++ b/pinry-spa/src/components/api.js @@ -154,8 +154,9 @@ function fetchPinsForBoard(boardId) { ); } -function fetchBoardForUser(username) { - const url = `${API_PREFIX}boards/?submitter__username=${username}`; +function fetchBoardForUser(username, offset = 0, limit = 50) { + const prefix = `${API_PREFIX}boards/?submitter__username=${username}`; + const url = `${prefix}&offset=${offset}&limit=${limit}`; return axios.get(url); }