mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-23 16:13:50 +00:00
add scope selection on accompanying course
This commit is contained in:
17
src/Bundle/ChillMainBundle/Resources/public/lib/api/scope.js
Normal file
17
src/Bundle/ChillMainBundle/Resources/public/lib/api/scope.js
Normal file
@@ -0,0 +1,17 @@
|
||||
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
|
||||
};
|
Reference in New Issue
Block a user