I have 2 endpoints:
Actually I use:
In your code it looks like they have no dependency on each other, because the result from this.user
is not used in this.grants.get
but I'll ignore that for now.
You can use the await
keyword to prevent nesting.
For example you could do the following:
const user = await this.user.toPromise();
const grants = await this.grants.get().toPromise();