|
|
|
@ -1,5 +1,4 @@
|
|
|
|
|
import { Injectable } from "@angular/core";
|
|
|
|
|
import { Http } from "@angular/http";
|
|
|
|
|
import { AuthHttp } from "angular2-jwt";
|
|
|
|
|
import { Observable } from "rxjs/Rx";
|
|
|
|
|
|
|
|
|
@ -7,11 +6,11 @@ import { ServiceAuthHelpers } from "./service.helpers";
|
|
|
|
|
|
|
|
|
|
@Injectable()
|
|
|
|
|
export class UpdateService extends ServiceAuthHelpers {
|
|
|
|
|
constructor(http: AuthHttp, private regularHttp: Http) {
|
|
|
|
|
super(http, "/api/v1/Jobs/");
|
|
|
|
|
constructor(http: AuthHttp) {
|
|
|
|
|
super(http, "/api/v1/Job/");
|
|
|
|
|
}
|
|
|
|
|
public forceUpdate(): Observable<boolean> {
|
|
|
|
|
return this.regularHttp.post(`${this.url}update/`, { headers: this.headers }).map(this.extractData);
|
|
|
|
|
return this.http.post(`${this.url}update/`, { headers: this.headers }).map(this.extractData);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public checkForNewUpdate(): Observable<boolean> {
|
|
|
|
|