mirror of
https://github.com/pinry/pinry.git
synced 2025-11-16 18:05:51 +01:00
Feature: Pins for board works well
This commit is contained in:
committed by
Isaac Bythewood
parent
c6c9266ec0
commit
4b5a55725f
@@ -18,6 +18,21 @@ function fetchPins(offset, tagFilter, userFilter) {
|
||||
);
|
||||
}
|
||||
|
||||
function fetchPinsForBoard(boardId) {
|
||||
const url = `${API_PREFIX}boards/${boardId}`;
|
||||
return new Promise(
|
||||
(resolve, reject) => {
|
||||
axios.get(url).then(
|
||||
(resp) => {
|
||||
resolve({ data: { results: resp.data.pins_detail } });
|
||||
},
|
||||
error => reject(error),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
export default {
|
||||
fetchPins,
|
||||
fetchPinsForBoard,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user