mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-11 09:14:59 +00:00
adding endpoint for LocationType. fetch types and add form fields.
This commit is contained in:
@@ -24,8 +24,21 @@ const getLocations = () => {
|
||||
});
|
||||
};
|
||||
|
||||
/*
|
||||
* Load Location Types
|
||||
*/
|
||||
const getLocationTypes = () => {
|
||||
const url = `/api/1.0/main/location-type.json`;
|
||||
return fetch(url)
|
||||
.then(response => {
|
||||
if (response.ok) { return response.json(); }
|
||||
throw Error('Error with request resource response');
|
||||
});
|
||||
};
|
||||
|
||||
export {
|
||||
getSocialIssues,
|
||||
getSocialActionByIssue,
|
||||
getLocations
|
||||
getLocations,
|
||||
getLocationTypes
|
||||
};
|
||||
|
Reference in New Issue
Block a user