mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
use fetchResult instead of makeFetch for acpw creation
This commit is contained in:
parent
046d3ec9f1
commit
8c8c16c1a1
@ -6,7 +6,7 @@ import {
|
|||||||
} from "ChillMainAssets/chill/js/date";
|
} from "ChillMainAssets/chill/js/date";
|
||||||
import { findSocialActionsBySocialIssue } from "ChillPersonAssets/vuejs/_api/SocialWorkSocialAction.js";
|
import { findSocialActionsBySocialIssue } from "ChillPersonAssets/vuejs/_api/SocialWorkSocialAction.js";
|
||||||
// import { create } from 'ChillPersonAssets/vuejs/_api/AccompanyingCourseWork.js';
|
// import { create } from 'ChillPersonAssets/vuejs/_api/AccompanyingCourseWork.js';
|
||||||
import { makeFetch } from "ChillMainAssets/lib/api/apiMethods";
|
import {fetchResults, makeFetch} from "ChillMainAssets/lib/api/apiMethods";
|
||||||
|
|
||||||
const debug = process.env.NODE_ENV !== "production";
|
const debug = process.env.NODE_ENV !== "production";
|
||||||
|
|
||||||
@ -168,9 +168,9 @@ const store = createStore({
|
|||||||
},
|
},
|
||||||
fetchOtherSocialIssues({ commit }) {
|
fetchOtherSocialIssues({ commit }) {
|
||||||
const url = `/api/1.0/person/social-work/social-issue.json`;
|
const url = `/api/1.0/person/social-work/social-issue.json`;
|
||||||
return makeFetch("GET", url)
|
return fetchResults(url)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
commit("updateIssuesOther", response.results);
|
commit("updateIssuesOther", response); // Directly commit the array of issues
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
throw error;
|
throw error;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user