mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
18 lines
343 B
JavaScript
18 lines
343 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
|
|
};
|