Feature: Add user-board view

This commit is contained in:
winkidney
2019-12-02 23:30:16 +08:00
committed by Isaac Bythewood
parent c59fa32f1f
commit e039ef7142
7 changed files with 281 additions and 1 deletions

View File

@@ -55,6 +55,11 @@ function fetchPinsForBoard(boardId) {
);
}
function fetchBoardForUser(username) {
const url = `${API_PREFIX}boards/?submitter__username=${username}`;
return axios.get(url);
}
const User = {
storageKey: 'pinry.user',
logIn(username, password) {
@@ -128,5 +133,6 @@ export default {
fetchPin,
fetchPins,
fetchPinsForBoard,
fetchBoardForUser,
User,
};