Base générale d'UI

This commit is contained in:
2019-12-01 22:12:13 +01:00
parent c6851f3f42
commit 048ef49933
49 changed files with 1913 additions and 88 deletions

24
client/src/util/api.js Normal file
View File

@ -0,0 +1,24 @@
export class APIClient {
saveBoard(board) {
return fetch(`/api/boards`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(board)
})
.then(res => res.json())
;
}
fetchBoards() {
return fetch(`/api/boards`)
.then(res => res.json())
;
}
}
export const api = new APIClient();