diff --git a/src/app/modules/home/components/about-us/about-us.component.ts b/src/app/modules/home/components/about-us/about-us.component.ts index ba863dd..3670e55 100644 --- a/src/app/modules/home/components/about-us/about-us.component.ts +++ b/src/app/modules/home/components/about-us/about-us.component.ts @@ -13,6 +13,10 @@ interface IContributor { }) export class AboutUsComponent { contributors: IContributor[] = [ + { + link: "https://github.com/nrglv", + username: "nrglv", + }, { link: "https://github.com/indicozy", username: "indicozy", diff --git a/src/app/services/companies.service.ts b/src/app/services/companies.service.ts index cbee951..4123a25 100644 --- a/src/app/services/companies.service.ts +++ b/src/app/services/companies.service.ts @@ -48,6 +48,10 @@ export interface GetCompanyResponse { userHasAnyReview: boolean; } +export interface VoteResponse { + result: boolean; +} + @Injectable() export class CompaniesService { private readonly apiUrl: string; @@ -123,8 +127,22 @@ export class CompaniesService { recentReviews(params: PageParams): Observable> { return this.api.get>( - "/api/company-reviews/recent?" + + "/api/companies/reviews/recent?" + new ConvertObjectToHttpParams(params).get(), ); } + + likeReview(companyId: string, reviewId: string): Observable { + return this.api.post( + this.apiUrl + companyId + "/reviews/" + reviewId + "/like", + {}, + ); + } + + dislikeReview(companyId: string, reviewId: string): Observable { + return this.api.post( + this.apiUrl + companyId + "/reviews/" + reviewId + "/dislike", + {}, + ); + } }