Feature: Add2Board with board creation works well

This commit is contained in:
winkidney
2019-12-06 14:11:18 +08:00
committed by Isaac Bythewood
parent 6cc78423a8
commit 4a33fd806a
3 changed files with 38 additions and 10 deletions

View File

@@ -27,6 +27,13 @@ const Board = {
const url = `${API_PREFIX}boards-auto-complete/?submitter__username=${username}`;
return axios.get(url);
},
addToBoard(boardId, pinIds) {
const url = `${API_PREFIX}boards/${boardId}/`;
return axios.patch(
url,
{ pins_to_add: pinIds },
);
},
};
const Pin = {