lrf402788946 5 vuotta sitten
vanhempi
commit
77bcf6ac96
1 muutettua tiedostoa jossa 6 lisäystä ja 6 poistoa
  1. 6 6
      src/store/classes.js

+ 6 - 6
src/store/classes.js

@@ -3,30 +3,30 @@ import Vuex from 'vuex';
 import _ from 'lodash';
 Vue.use(Vuex);
 const api = {
-  class: `/api/class`,
+  interface: `/api/class`,
 };
 const state = () => ({});
 const mutations = {};
 
 const actions = {
   async query({ commit }, { skip = 0, limit = this.$limit, ...info }) {
-    const res = await this.$axios.$get(`${api.class}`, { skip, limit, ...info });
+    const res = await this.$axios.$get(`${api.interface}`, { skip, limit, ...info });
     return res;
   },
   async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.class}`, payload);
+    const res = await this.$axios.$post(`${api.interface}`, payload);
     return res;
   },
   async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.class}/${payload}`);
+    const res = await this.$axios.$get(`${api.interface}/${payload}`);
     return res;
   },
   async update({ commit }, { id, ...data }) {
-    const res = await this.$axios.$post(`${api.class}/update/${id}`, data);
+    const res = await this.$axios.$post(`${api.interface}/update/${id}`, data);
     return res;
   },
   async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.class}/${payload}`);
+    const res = await this.$axios.$delete(`${api.interface}/${payload}`);
     return res;
   },
 };