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> <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,16 +51,9 @@ 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) {
this.$store this.$store