Collect Film's nested data on mounted (Locations/Vehicles/People)

This commit is contained in:
2020-12-21 13:57:18 +01:00
parent fffbc87964
commit 67680804e2
5 changed files with 121 additions and 11 deletions

View File

@@ -3,7 +3,7 @@ export const state = () => ({
});
export const mutations = {
setlocation: (state, location) => {
setLocation: (state, location) => {
state.location = location;
}
};
@@ -15,7 +15,7 @@ export const actions = {
if (callback) return location;
commit("setLocation", location);
} catch (e) {
throw Error("API Error occurred.");
throw Error(`API Error occurred: ${e.message}`);
}
}
};