Feature: Pins for board works well

This commit is contained in:
winkidney
2019-11-28 23:12:19 +08:00
committed by Isaac Bythewood
parent c6c9266ec0
commit 4b5a55725f
6 changed files with 68 additions and 5 deletions

View File

@@ -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,
};