Revision 58444
Added by Konstantina Galouni about 4 years ago
manage-user-notifications.service.ts | ||
---|---|---|
12 | 12 |
constructor(private http: HttpClient) { |
13 | 13 |
} |
14 | 14 |
|
15 |
getUserNotifications(url: string, email: string) { |
|
15 |
getUserNotifications(properties: EnvProperties, pid: string, email: string) { |
|
16 |
let url: string = properties.adminToolsAPIURL + 'community/'+ pid + '/notifications'; |
|
16 | 17 |
return this.http.get(url)//.map(res => <any> res.json()) |
17 | 18 |
.pipe(map(res => this.parseUserNotifications(res, email))); |
18 | 19 |
} |
19 | 20 |
|
20 |
updateUserNotifications(url: string, userNotificationsRights: any) {
|
|
21 |
updateUserNotifications(properties: EnvProperties, pid: string, userNotificationsRights: any) {
|
|
21 | 22 |
//let headers = new Headers({'Content-Type': 'application/json'}); |
22 | 23 |
//let options = new RequestOptions({headers: headers}); |
23 | 24 |
let body = JSON.stringify(userNotificationsRights); |
24 |
|
|
25 |
let url: string = properties.adminToolsAPIURL + 'community/' + pid + '/notifications'; |
|
25 | 26 |
return this.http.post(url, body, CustomOptions.getAuthOptionsWithBody()); |
26 | 27 |
//.do(request => console.log("Insert Response:"+request.status)); |
27 | 28 |
} |
Also available in: Unified diff
[Trunk | Admin]:
1. community-edit-form.component.ts & manage-subscribers.component.ts &curator.component.ts & customization.component.ts & manage-user-notifications.component.ts & manage-user-notifications.service.ts:
create request path in service and "properties" as first parameter in methods (curator.service.ts, layout.service.ts, subscribe.service.ts).
2. manageContentProviders.service.ts & manageProjects.service.ts & manageZenodoCommunities.service.ts: Rename "communityId" to "pid".