You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
550 B
19 lines
550 B
import { HttpClient } from '@angular/common/http';
|
|
import { Injectable } from '@angular/core';
|
|
import { Observable } from 'rxjs';
|
|
import { ReviewDto } from '../model/review.model';
|
|
|
|
@Injectable({
|
|
providedIn: 'root'
|
|
})
|
|
export class ReviewService {
|
|
|
|
path:string = "http://localhost:59279/api3";
|
|
|
|
constructor(private httpClient:HttpClient) { }
|
|
|
|
public getReviewsByProduct(pid:string): Observable<ReviewDto[]> {
|
|
let review_get_api = this.path + "/review/product?pid=" + pid;
|
|
return this.httpClient.get<ReviewDto[]>(review_get_api);
|
|
}
|
|
}
|