mirror of
https://github.com/pinry/pinry.git
synced 2026-01-20 06:02:05 +01:00
Fix: Should not load repeated boards list
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user