mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-30 06:03:45 +01:00
fix bug
Signed-off-by: FangyuanCheng <fangyuanc@vmware.com>
This commit is contained in:
parent
74162f0cec
commit
7b7cc5c0a3
@ -59,7 +59,7 @@ export abstract class EndpointService {
|
|||||||
*
|
*
|
||||||
* @memberOf EndpointService
|
* @memberOf EndpointService
|
||||||
*/
|
*/
|
||||||
abstract getAdapters(): Observable<any> | Promise<any> | any;
|
abstract getAdapters(): Observable<any>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create new endpoint.
|
* Create new endpoint.
|
||||||
@ -178,12 +178,11 @@ export class EndpointDefaultService extends EndpointService {
|
|||||||
, catchError(error => observableThrowError(error)));
|
, catchError(error => observableThrowError(error)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public getAdapters(): Observable<any> | Promise<any> | any {
|
public getAdapters(): Observable<any> {
|
||||||
return this.http
|
return this.http
|
||||||
.get(`/api/replication/adapters`)
|
.get(`/api/replication/adapters`)
|
||||||
.toPromise()
|
.pipe(map(response => response.json() as Adapter)
|
||||||
.then(response => response.json() as Adapter)
|
, catchError(error => observableThrowError(error)));
|
||||||
.catch(error => Promise.reject(error));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public createEndpoint(
|
public createEndpoint(
|
||||||
|
Loading…
Reference in New Issue
Block a user