From 4dc5966e51aca53c804aeb88ee16712d87b42daf Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Sat, 7 Sep 2019 12:30:27 -0400 Subject: [PATCH] [+] Load assignments --- src/components/app/app.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/components/app/app.ts b/src/components/app/app.ts index 98e7889..5d6661a 100644 --- a/src/components/app/app.ts +++ b/src/components/app/app.ts @@ -123,17 +123,13 @@ export default class App extends Vue */ public loadAssignments() { - // Assign courses - this.courses = courses; - - // Debug output TODO: Remove this - console.log(courses); - // Get assignments for all the courses this.courses.forEach(course => { // Send request to get assignments - fetch(`${Constants.API_URL}/veracross/assignments?id=${course.assignmentsId}`).then(res => + fetch(`${Constants.API_URL}/assignments`, + {method: 'POST', body: JSON.stringify({token: this.token, id: course.assignmentsId})}) + .then(res => { // Get response body text res.text().then(text =>