use fetchResult instead of makeFetch

This commit is contained in:
Julie Lenaerts 2025-02-27 15:58:53 +01:00
parent 66e4bab558
commit 596833f1a5

View File

@ -29,7 +29,7 @@
<script>
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";
export default {
@ -51,15 +51,8 @@ export default {
},
methods: {
getOptions() {
const url = `/api/1.0/person/social-work/social-issue.json`;
makeFetch("GET", url)
.then((response) => {
this.options = response.results;
return response;
})
.catch((error) => {
commit("catchError", error);
this.$toast.open({ message: error.txt });
fetchResults(`/api/1.0/person/social-work/social-issue.json`).then((response) => {
this.options = response;
});
},
updateSocialIssues(value) {