[F] Fix assignments null

This commit is contained in:
Hykilpikonna
2019-09-07 13:01:05 -04:00
parent 4dc5966e51
commit 7b0f11a1f4
+15 -2
View File
@@ -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 =>