index.js 936 Bytes
import api from "../index";
import urls from "./urls";

export default {
  //code
  storeconfs(params, id) {
    return api.get(urls.storeconfs, params);
  },
  cates(params, id) {
    return api.get(urls.cates, params);
  },
  codes(params, id) {
    return api.get(urls.codes + id + "/codes", params);
  },
  customCode(params, id) {
    return api.get(urls.customCode, params);
  },
  eventCates(params) {
    return api.get(urls.eventCates, params);
  },
  eventType(params, event_type_unid) {
    return api.get(urls.eventType(event_type_unid), params);
  },
  eventTypes(params, id) {
    return api.get(urls.eventTypes, params);
  },
  addEventTypes(params, id) {
    return api.post(urls.eventTypes, params);
  },
  editEventType(params, event_unid) {
    return api.post(urls.editEventType(event_unid), params);
  },
  deleteEventType(params, event_unid) {
    return api.delete(urls.editEventType(event_unid), params);
  }
};