summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/environments/mixins/environments_mixin.js
blob: 25b24fbd6dcf8f6db446f6d7ac2f895979bbfea0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
export default {
  methods: {
    saveData(resp) {
      const response = {
        headers: resp.headers,
        body: resp.json(),
      };

      this.isLoading = false;

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