Fix people details page + pass test

This commit is contained in:
2020-12-21 22:53:04 +01:00
parent c3bb17f863
commit 3a8c052d86
3 changed files with 30 additions and 7 deletions

View File

@@ -25,7 +25,9 @@ export const actions = {
},
async getPerson({ commit }, id) {
try {
const person = await this.$axios.$get(`/api/people/${id}`);
const person = await this.$axios.$get(
`/api/people/${id}?fields=id,name,gender,age,eye_color,hair_color,films`
);
commit("setPerson", person);
} catch (e) {
throw Error(`API Error occurred: ${e.message}`);