summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/environments/mixins/environments_mixin.js
blob: 8f4066e3a6ea7d4e2270b54ac32a0720eea1cddc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
export default {
  methods: {
    saveData(resp) {
      const headers = resp.headers;
      return resp.json().then((response) => {
        this.isLoading = false;

        this.store.storeAvailableCount(response.available_count);
        this.store.storeStoppedCount(response.stopped_count);
        this.store.storeEnvironments(response.environments);
        this.store.setPagination(headers);
      });
    },
  },
};