Before we implement the Vuex store, let's get those services created. We will need to create teamService in the front-end/src/services/teams.js file, which looks like this:
...export default { /** * Create a team * @param {*} detail the detail of the team */ create (detail) { return new Promise((resolve, reject) => { axios.post('/teams', detail).then(({data}) => { resolve(data) }).catch((error) => { reject(errorParser.parse(error)) }) }) }}
As you can see, this service only has one method, create(), which send the team's detail to /api/teams in a POST request.
We will also need to create boardService, which is very similar to teamService, as you can see:
...export default { /** * Create a new board ...