Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
postRating(nodeId: string, ratingType: string, vote: any): Observable {
const ratingBody: RatingBody = new RatingBody({
'id': ratingType,
'myRating': vote
});
return from(this.apiService.getInstance().core.ratingsApi.rate(nodeId, ratingBody))
.pipe(
catchError(this.handleError)
);
}