[Library | trunk]: Add methods on user registry service
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@59315 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
530a441f4a
commit
4189a8f114
|
@ -27,6 +27,28 @@ export class UserRegistryService {
|
||||||
null, CustomOptions.registryOptions())
|
null, CustomOptions.registryOptions())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public removeManagerRole(type: string, id: string, email: string): Observable<any> {
|
||||||
|
return this.http.delete<any>(properties.registryUrl +
|
||||||
|
encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/manager/' + encodeURIComponent(email), CustomOptions.registryOptions());
|
||||||
|
}
|
||||||
|
|
||||||
|
public invite(type: string, id: string, email: string): Observable<any[]> {
|
||||||
|
return this.http.post<any>(properties.registryUrl + 'invite/' +
|
||||||
|
encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/manager/' + encodeURIComponent(email), null,
|
||||||
|
CustomOptions.registryOptions()).pipe(map((response: any) => response.response));
|
||||||
|
}
|
||||||
|
|
||||||
|
public cancelInvitation(type: string, id: string, email: string): Observable<any> {
|
||||||
|
return this.http.delete<any>(properties.registryUrl + 'invite/' +
|
||||||
|
encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/manager/' + encodeURIComponent(email),
|
||||||
|
CustomOptions.registryOptions());
|
||||||
|
}
|
||||||
|
|
||||||
|
public getPendingManagers(type: string, id: string): Observable<any[]> {
|
||||||
|
return this.http.get<any>(properties.registryUrl + 'invite/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/managers/',
|
||||||
|
CustomOptions.registryOptions()).pipe(map((response: any) => response.response));
|
||||||
|
}
|
||||||
|
|
||||||
public getSubscribers(type: string, id: string): Observable<any[]> {
|
public getSubscribers(type: string, id: string): Observable<any[]> {
|
||||||
return this.http.get<any>(properties.registryUrl + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/subscribers/').pipe(map(response => response.response));
|
return this.http.get<any>(properties.registryUrl + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/subscribers/').pipe(map(response => response.response));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue