mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
[person][relations] Fixed: GET request had a body, this prevented to
load files
This commit is contained in:
parent
a91b35298a
commit
99b261b1d7
@ -5,8 +5,10 @@ import {makeFetch} from 'ChillMainAssets/lib/api/apiMethods.js';
|
||||
* @function getFetch
|
||||
* @param url
|
||||
* @returns {Promise<Response>}
|
||||
* @deprecated use makeFetch instead
|
||||
*/
|
||||
const getFetch = (url) => {
|
||||
console.error('deprecated method');
|
||||
return makeFetch('GET', url, null)
|
||||
}
|
||||
|
||||
@ -51,8 +53,10 @@ const getHouseholdByPerson = (person) => {
|
||||
if (person.current_household_id === null) {
|
||||
throw 'Currently the person has not household!'
|
||||
}
|
||||
return getFetch(
|
||||
`/api/1.0/person/household/${person.current_household_id}.json`)
|
||||
return makeFetch(
|
||||
'GET',
|
||||
`/api/1.0/person/household/${person.current_household_id}.json`
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -62,8 +66,10 @@ const getHouseholdByPerson = (person) => {
|
||||
*/
|
||||
const getCoursesByPerson = (person) => {
|
||||
//console.log('getCoursesByPerson', person._id)
|
||||
return getFetch(
|
||||
`/api/1.0/person/accompanying-course/by-person/${person._id}.json`)
|
||||
return makeFetch(
|
||||
'GET',
|
||||
`/api/1.0/person/accompanying-course/by-person/${person._id}.json`
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -73,8 +79,10 @@ const getCoursesByPerson = (person) => {
|
||||
*/
|
||||
const getRelationshipsByPerson = (person) => {
|
||||
//console.log('getRelationshipsByPerson', person.id)
|
||||
return getFetch(
|
||||
`/api/1.0/relations/relationship/by-person/${person._id}.json`)
|
||||
return makeFetch(
|
||||
'GET',
|
||||
`/api/1.0/relations/relationship/by-person/${person._id}.json`
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -82,7 +90,7 @@ const getRelationshipsByPerson = (person) => {
|
||||
* @returns {Promise<Response>}
|
||||
*/
|
||||
const getRelationsList = () => {
|
||||
return getFetch(`/api/1.0/relations/relation.json`)
|
||||
return makeFetch('GET', `/api/1.0/relations/relation.json`);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user