visgraph: adding endpoint to get list of relations

This commit is contained in:
2021-11-02 09:49:47 +01:00
parent d06a4b1ca9
commit bd2ee9ddc1
4 changed files with 47 additions and 5 deletions

View File

@@ -110,6 +110,14 @@ const getRelationshipsByPerson = (person) => {
`/api/1.0/relations/relationship/by-person/${person._id}.json`)
}
/**
* Return list of relations
* @returns {Promise<Response>}
*/
const getRelationsList = () => {
return getFetch(`/api/1.0/relations/relation.json`)
}
/**
* @function postRelationship
* @param person
@@ -132,5 +140,6 @@ export {
getHouseholdByPerson,
getCoursesByPerson,
getRelationshipsByPerson,
postRelationship
getRelationsList,
postRelationship,
}