mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 02:23:51 +00:00
use fetchResult instead of makeFetch for SocialIssuesAcc.vue component
This commit is contained in:
@@ -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 = () => {
|
||||
|
Reference in New Issue
Block a user