Files
chill-bundles/src/Bundle/ChillMainBundle/Resources/public/lib/api/scope.js
2021-09-29 11:21:06 +02:00

18 lines
347 B
JavaScript

const fetchScopes = () => {
return window.fetch('/api/1.0/main/scope.json').then(response => {
if (response.ok) {
return response.json();
}
}).then(data => {
//console.log(data);
return new Promise((resolve, reject) => {
//console.log(data);
resolve(data.results);
});
});
};
export {
fetchScopes
};