diff --git a/src/abstraction/resources/sportCategoryPorgramResource.js b/src/abstraction/resources/sportCategoryPorgramResource.js
index abc1163..2fdff9a 100644
--- a/src/abstraction/resources/sportCategoryPorgramResource.js
+++ b/src/abstraction/resources/sportCategoryPorgramResource.js
@@ -1,6 +1,6 @@
export const getJsonSportCategory = (data) => ({
- id: data.sport_category.id,
- name: data.sport_category.name,
- local_name: data.sport_category.local_name,
- language_id: data.sport_category.language_id,
+ id: data.id,
+ name: data.name,
+ local_name: data.local_name,
+ language_id: data.language_id,
})
\ No newline at end of file
diff --git a/src/abstraction/resources/trainerProgramResource.js b/src/abstraction/resources/trainerProgramResource.js
index f050427..7cf3970 100644
--- a/src/abstraction/resources/trainerProgramResource.js
+++ b/src/abstraction/resources/trainerProgramResource.js
@@ -1,11 +1,11 @@
export const getJsonTrainer = (data) => ({
- id: data.trainer.id,
- first_name: data.trainer.first_name,
- last_name: data.trainer.last_name,
- birthday: data.trainer.birthday,
- weight: data.trainer.weight,
- height: data.trainer.height,
- arm_diameter: data.trainer.arm_diameter,
- leg_diameter: data.trainer.leg_diameter,
- details: data.trainer.details
+ id: data.id,
+ first_name: data.first_name,
+ last_name: data.last_name,
+ birthday: data.birthday,
+ weight: data.weight,
+ height: data.height,
+ arm_diameter: data.arm_diameter,
+ leg_diameter: data.leg_diameter,
+ details: data.details
})
\ No newline at end of file
diff --git a/src/components/Programs/Item.vue b/src/components/Programs/Item.vue
index 728f20b..179b874 100644
--- a/src/components/Programs/Item.vue
+++ b/src/components/Programs/Item.vue
@@ -37,7 +37,7 @@
{{ program.title }}
- {{ program.subTitle }}
+ {{ program.description }}
- {{ program.sets }} sets
+ {{ program.series_count }} sets
\ No newline at end of file
diff --git a/src/store/modules/auth/actions.js b/src/store/modules/auth/actions.js
index 30ddff7..c490f64 100644
--- a/src/store/modules/auth/actions.js
+++ b/src/store/modules/auth/actions.js
@@ -29,6 +29,7 @@ export default {
async register({ commit }, data) {
let repository = new AuthRepository();
const response = await repository.register(data);
+ console.log(response);
setTokenHeader(commit, response);
},
-};
+};
diff --git a/src/store/modules/programs/actions.js b/src/store/modules/programs/actions.js
index 70af4b3..89f9790 100644
--- a/src/store/modules/programs/actions.js
+++ b/src/store/modules/programs/actions.js
@@ -1,15 +1,9 @@
import ProgramRepository from "@/abstraction/repository/programRepository";
export default {
- async loadPrograms({ state, commit }) {
- try {
- let data = { pagination: state.pagination };
- let repository = new ProgramRepository();
- const resource = await repository.index(data);
- console.log(resource.data);
- commit("SET_PROGRAMS", resource.data);
- commit("SET_PAGINATION", resource.pagination);
- } catch (e) {
- return e;
- }
- },
+ async loadPrograms({ commit }) {
+ let repository = new ProgramRepository();
+ const resource = await repository.index();
+ commit("SET_PROGRAMS", resource.data);
+ commit("SET_PAGINATION", resource.pagination);
+ }
};
diff --git a/src/store/modules/programs/getters.js b/src/store/modules/programs/getters.js
index f929a4c..8f6da3d 100644
--- a/src/store/modules/programs/getters.js
+++ b/src/store/modules/programs/getters.js
@@ -1,3 +1,4 @@
export default {
getPrograms: state => state.programs,
};
+
\ No newline at end of file
diff --git a/src/store/modules/programs/mutations.js b/src/store/modules/programs/mutations.js
index 06612de..cb447aa 100644
--- a/src/store/modules/programs/mutations.js
+++ b/src/store/modules/programs/mutations.js
@@ -8,4 +8,4 @@ export default {
Vue.set(state, "pagination", pagination);
},
};
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/store/modules/programs/state.js b/src/store/modules/programs/state.js
index 4b09918..8074c84 100644
--- a/src/store/modules/programs/state.js
+++ b/src/store/modules/programs/state.js
@@ -4,3 +4,4 @@ export default {
itemsPerPage: 12
},
};
+
\ No newline at end of file