Looking to convert this Typescript method into one that returns a Promise, but only once the
this.user.currentCourseId = student.currentCourseId;
line has been executed.
Is it feasible to achieve this?
public getUserData()
{
...
this.authState.auth.getToken().then(token =>
{
this.user.token = token;
this.userService.update(this.user).then(student =>
{
this.user.currentCourseId = student.currentCourseId;
});
});
}