[+] Call back when the response text is ready
This commit is contained in:
@@ -26,6 +26,8 @@ export default class Login extends Vue
|
|||||||
// Get response body text
|
// Get response body text
|
||||||
res.text().then(text =>
|
res.text().then(text =>
|
||||||
{
|
{
|
||||||
|
// Call custom text event
|
||||||
|
this.$emit('login:courses', JSON.parse(text));
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(alert);
|
.catch(alert);
|
||||||
|
|||||||
Reference in New Issue
Block a user