use fetchResult instead of makeFetch for SocialIssuesAcc.vue component

This commit is contained in:
2025-02-27 16:12:00 +01:00
parent 596833f1a5
commit 046d3ec9f1
2 changed files with 33 additions and 52 deletions

View File

@@ -1,4 +1,4 @@
import { fetchResults } from "ChillMainAssets/lib/api/apiMethods.ts";
import {fetchResults} from "ChillMainAssets/lib/api/apiMethods.ts";
/*
* Endpoint v.2 chill_api_single_accompanying_course__entity
@@ -33,18 +33,7 @@ const getUserJobs = () => fetchResults("/api/1.0/main/user-job.json");
const getSocialIssues = () => {
const url = `/api/1.0/person/social-work/social-issue.json`;
return fetch(url).then((response) => {
if (response.ok) {
return response.json();
}
throw {
msg: "Error while retriving Social Issues.",
sta: response.status,
txt: response.statusText,
err: new Error(),
body: response.body,
};
});
return fetchResults(url);
};
const whoami = () => {