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.
Ombi/src/Ombi/ClientApp/src/app/services/issuesv2.service.ts

24 lines
1.0 KiB

import { PlatformLocation, APP_BASE_HREF } from "@angular/common";
import { Injectable, Inject } from "@angular/core";
import { HttpClient } from "@angular/common/http";
import { Observable } from "rxjs";
import { IIssueCategory, IIssueComments, IIssueCount, IIssues, IIssuesChat, IIssuesSummary, INewIssueComments, IssueStatus, IUpdateStatus } from "../interfaces";
import { ServiceHelpers } from "./service.helpers";
@Injectable()
export class IssuesV2Service extends ServiceHelpers {
constructor(http: HttpClient, @Inject(APP_BASE_HREF) href:string) {
super(http, "/api/v2/Issues/", href);
}
public getIssues(position: number, take: number, status: IssueStatus): Observable<IIssuesSummary[]> {
return this.http.get<IIssuesSummary[]>(`${this.url}${position}/${take}/${status}`, {headers: this.headers});
}
public getIssuesByProviderId(providerId: string): Observable<IIssuesSummary> {
return this.http.get<IIssuesSummary>(`${this.url}details/${providerId}`, {headers: this.headers});
}
}