Merge commit '965b1ee134bc56313b5912e83a2ae23387e4c493' into new-theme

This commit is contained in:
Konstantinos Triantafyllou 2022-02-11 15:38:12 +02:00
commit 5901716bff
1 changed files with 6 additions and 0 deletions

View File

@ -92,6 +92,9 @@ export class StakeholderService {
}
buildStakeholder(url: string, stakeholder: Stakeholder): Observable<Stakeholder> {
if(stakeholder.alias && stakeholder.alias.startsWith('/')) {
stakeholder.alias = stakeholder.alias.slice(1);
}
return this.http.post<Stakeholder>(url + '/build-stakeholder', stakeholder, CustomOptions.registryOptions()).pipe(map(stakeholder => {
return this.formalize(this.checkIsUpload(stakeholder));
}));
@ -102,6 +105,9 @@ export class StakeholderService {
}
saveElement(url: string, element: any, path: string[] = []): Observable<any> {
if(element.alias && element.alias.startsWith('/')) {
element.alias = element.alias.slice(1);
}
path = HelperFunctions.encodeArray(path);
return this.http.post<any>(url + ((path.length > 0) ? '/' : '') + path.join('/') +
'/save', element, CustomOptions.registryOptions()).pipe(map(element => {