Skip to content
This repository was archived by the owner on May 7, 2021. It is now read-only.

Commit c60ee17

Browse files
committed
fix(url): add the hardcoded https
1 parent e01710f commit c60ee17

1 file changed

Lines changed: 2 additions & 22 deletions

File tree

src/app/stack/stack-analyses.service.ts

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,20 @@
1-
import { Injectable, Inject } from '@angular/core';
1+
import { Injectable } from '@angular/core';
22
import { Http, Response } from '@angular/http';
33

44
import { Observable } from 'rxjs/Observable';
55
import 'rxjs/add/operator/catch';
66
import 'rxjs/add/operator/map';
77

8-
import { WIT_API_URL } from 'ngx-fabric8-wit';
9-
108
@Injectable()
119
export class StackAnalysesService {
1210

1311
private stackAnalysesUrl: string = '';
1412

15-
private recommenderString: string = 'recommender';
16-
private doubleSlash: string = '//';
17-
private dot: string = '.';
18-
private singleSlash: string = '/';
19-
private v1Extension: string = 'v1';
20-
2113
constructor(
2214
private http: Http,
23-
@Inject(WIT_API_URL) apiUrl: string,
2415
) {
25-
if(process && process.env && process.env.FABRIC8_RECOMMENDER_API) {
26-
this.stackAnalysesUrl = process.env.FABRIC8_RECOMMENDER_API;
27-
} else {
28-
if(apiUrl) {
29-
this.stackAnalysesUrl = apiUrl.replace(this.doubleSlash, this.doubleSlash + this.recommenderString + this.dot);
30-
let len: number = this.stackAnalysesUrl.length;
31-
if(this.stackAnalysesUrl[len - 1] !== this.singleSlash) {
32-
this.stackAnalysesUrl += this.singleSlash;
33-
}
34-
this.stackAnalysesUrl += this.v1Extension + this.singleSlash;
35-
}
16+
this.stackAnalysesUrl = 'https://recommender.api.prod-preview.openshift.io/api/v1/';
3617
}
37-
}
3818

3919
getStackAnalyses(id: string): Observable<any> {
4020
return this.http.get(this.buildStackAnalysesUrl(id))

0 commit comments

Comments
 (0)