New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(dependency): update dsp-js to v2.0.0 and dsp-api to v13.2.0 #276
Conversation
return this._userCache.getUser(userIri); | ||
getUser(userIri: string): Observable<UserResponse> { | ||
return this._userCache.getUser(userIri).pipe( | ||
map(user => user) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
map to the user contained in UserResponse
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was the solution that worked. But if you (@tobiasschweizer) have time, feel free to checkout this branch and fix it as it should. Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw I wasn't sure about this AsyncSubject
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I'll take a look at it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have substituted all occurrences of AsyncSubject
for Observable
in the specs in d289137.
Before, the cache returned an AsyncSubject
, now this is an Observable
. However, an AsyncSubject
is also an Observable
, but now simply of
can be used in the specs.
About the map
: we could use it like this:
getUser(userIri: string): Observable<ReadUser> {
return this._userCache.getUser(userIri).pipe(
map(userRes => userRes.user)
);
}
So instead of a UserResponse
, the ReadUser
would be returned directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @tobiasschweizer. So, it's solved now? Would you like to "review" and approve?
No description provided.