diff --git a/src/components/app/app.ts b/src/components/app/app.ts index 5d6661a..5449641 100644 --- a/src/components/app/app.ts +++ b/src/components/app/app.ts @@ -134,8 +134,21 @@ export default class App extends Vue // Get response body text res.text().then(text => { - // Parse json and filter it - course.assignments = JsonUtils.filterAssignments(JSON.parse(text)); + // Parse response + let response = JSON.parse(text); + + // Check success + if (response.success) + { + // Load assignments + // Parse json and filter it + course.assignments = JsonUtils.filterAssignments(response.data); + } + else + { + // Show error message TODO: Show it properly + alert(response.data); + } }) }) .catch(err =>