mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
use fetchResult instead of makeFetch
This commit is contained in:
parent
66e4bab558
commit
596833f1a5
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import VueMultiselect from "vue-multiselect";
|
import VueMultiselect from "vue-multiselect";
|
||||||
import { makeFetch } from "ChillMainAssets/lib/api/apiMethods";
|
import {fetchResults, makeFetch} from "ChillMainAssets/lib/api/apiMethods";
|
||||||
import { mapGetters, mapState } from "vuex";
|
import { mapGetters, mapState } from "vuex";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -51,15 +51,8 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getOptions() {
|
getOptions() {
|
||||||
const url = `/api/1.0/person/social-work/social-issue.json`;
|
fetchResults(`/api/1.0/person/social-work/social-issue.json`).then((response) => {
|
||||||
makeFetch("GET", url)
|
this.options = response;
|
||||||
.then((response) => {
|
|
||||||
this.options = response.results;
|
|
||||||
return response;
|
|
||||||
})
|
|
||||||
.catch((error) => {
|
|
||||||
commit("catchError", error);
|
|
||||||
this.$toast.open({ message: error.txt });
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
updateSocialIssues(value) {
|
updateSocialIssues(value) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user