Skip to content

Commit

Permalink
SHIBUI-1711 Fixed path issue
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Jan 22, 2020
1 parent 59f11ab commit 634a943
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions ui/proxy.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
"^/shibui": ""
}
},
"/shibui/login": {
"/login": {
"target": "http://localhost:8080",
"secure": false,
"logLevel": "debug",
"pathRewrite": {
"^/shibui": ""
}
},
"/shibui/logout": {
"/logout": {
"target": "http://localhost:8080",
"secure": false,
"logLevel": "debug",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe(`Attributes Service`, () => {
const type = 'resource';
service.getVersion(resourceId, type).subscribe();
backend.expectOne((req: HttpRequest<any>) => {
return req.url === `/${service.base}/${PATHS[type]}/${resourceId}`
return req.url === `${service.base}/${PATHS[type]}/${resourceId}`
&& req.method === 'GET';
}, `GET schema by path`);
}
Expand All @@ -59,7 +59,7 @@ describe(`Attributes Service`, () => {
const versionId = '1';
service.getVersion(resourceId, type, versionId).subscribe();
backend.expectOne((req: HttpRequest<any>) => {
return req.url === `/${service.base}/${PATHS[type]}/${resourceId}/${service.path}/${versionId}`
return req.url === `${service.base}/${PATHS[type]}/${resourceId}/${service.path}/${versionId}`
&& req.method === 'GET';
}, `GET schema by path`);
}
Expand All @@ -74,7 +74,7 @@ describe(`Attributes Service`, () => {
const versionId = '1';
service.updateVersion(resourceId, type, {} as Metadata).subscribe();
backend.expectOne((req: HttpRequest<any>) => {
return req.url === `/${service.base}/${PATHS[type]}/${resourceId}`
return req.url === `${service.base}/${PATHS[type]}/${resourceId}`
&& req.method === 'PUT';
}, `PUT schema by path`);
}
Expand Down
4 changes: 2 additions & 2 deletions ui/src/app/metadata/configuration/service/history.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class MetadataHistoryService {
) { }

query(resourceId: string, type: string): Observable<MetadataHistory> {
return this.http.get<MetadataVersion[]>(`/${this.base}/${PATHS[type]}/${resourceId}/${this.path}`).pipe(
return this.http.get<MetadataVersion[]>(`${this.base}/${PATHS[type]}/${resourceId}/${this.path}`).pipe(
map(resp => ({
versions: resp
}))
Expand All @@ -42,6 +42,6 @@ export class MetadataHistoryService {
}

updateVersion(resourceId: string, type: string, model: Metadata): Observable<Metadata> {
return this.http.put<Metadata>(`/${this.base}/${PATHS[type]}/${resourceId}`, model);
return this.http.put<Metadata>(`${this.base}/${PATHS[type]}/${resourceId}`, model);
}
}

0 comments on commit 634a943

Please sign in to comment.