function getAllCourses() {fetch('http://localhost:8080/course', { method: 'POST', mode: 'no-cors', credentials: 'same-origin', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json', }, body: JSON.stringify({ objectClass: 'course', crud: '2' })}).then(function (response) { console.log(response); return response.json();}).catch(function (err) { console.log(err)});}
return response.json();
[ { "0x1": { "users": [], "lectures": [], "owner": "0x2", "title": "WWI 14 SEA", "description": null, "objectClass": "course", "id": "course_00001" }, "0x2": { "username": "system", "lectures": [], "course": null, "solutions": [], "exercises": [], "roles": [ "0x3", "0x4", "0x5" ], "objectClass": "user", "id": "user_00001" }, "0x3": { "roleName": "ROLE_ADMIN", "objectClass": "role", "id": "role_00001" }, "0x4": { "roleName": "ROLE_STUDENT", "objectClass": "role", "id": "role_00002" }, "0x5": { "roleName": "ROLE_DOCENT", "objectClass": "role", "id": "role_00003" } }]
ABOUTYOU
相关分类