I have to write a entitiesService.add function with the conditions below. I have the image of the bug that I am trying to clear. I have payload in the response but it does not include the id. I need to add id but I am not how since they only let me use the parameter payload.
.
entitiesService.add = (payload) => {
console.log("addEntities is executing", payload);
const config = {
method: "POST",
url: entitiesService.endpoint,
data: payload,
crossdomain: true,
headers: {
"Content-Type": "application/json"
},
};
return axios(config).then(response => {
return payload
})
};