mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
Fix search demo for non-default repo hostnames
This commit is contained in:
parent
f2275ebdcb
commit
532dd2a244
@ -30,11 +30,9 @@ declare let AlfrescoApi: any;
|
|||||||
export class AlfrescoService {
|
export class AlfrescoService {
|
||||||
|
|
||||||
private _baseUrlPath: string = '/alfresco/api/-default-/public/alfresco/versions/1';
|
private _baseUrlPath: string = '/alfresco/api/-default-/public/alfresco/versions/1';
|
||||||
private _alfrescoClient;
|
|
||||||
|
|
||||||
constructor(private http: Http,
|
constructor(private http: Http,
|
||||||
private settings: AlfrescoSettingsService) {
|
private settings: AlfrescoSettingsService) {
|
||||||
this._alfrescoClient = AlfrescoApi.getClientWithTicket(this.getBaseUrl(), this.getAlfrescoTicket());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public getHost(): string {
|
public getHost(): string {
|
||||||
@ -49,8 +47,12 @@ export class AlfrescoService {
|
|||||||
return localStorage.getItem('token');
|
return localStorage.getItem('token');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private getAlfrescoClient() {
|
||||||
|
return AlfrescoApi.getClientWithTicket(this.getBaseUrl(), this.getAlfrescoTicket());
|
||||||
|
}
|
||||||
|
|
||||||
private getSearchNodesPromise(term: string) {
|
private getSearchNodesPromise(term: string) {
|
||||||
let apiInstance = new AlfrescoApi.Core.SearchApi(this._alfrescoClient);
|
let apiInstance = new AlfrescoApi.Core.SearchApi(this.getAlfrescoClient());
|
||||||
let nodeId = '-root-';
|
let nodeId = '-root-';
|
||||||
let opts = {
|
let opts = {
|
||||||
include: ['path'],
|
include: ['path'],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user