Project

General

Profile

« Previous | Next » 

Revision 58444

[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".

View differences:

manageZenodoCommunities.service.ts
6 6
export class  ManageZenodoCommunitiesService {
7 7
  constructor(private http: HttpClient ) {}
8 8

  
9
  removeZCommunity (properties: EnvProperties, communityId: string,id: string):any {
9
  removeZCommunity (properties: EnvProperties, pid: string,id: string):any {
10 10
    //let headers = new Headers({'Content-Type': 'application/json', 'accept': 'application/json'});
11 11
    //let options = new RequestOptions({headers: headers, body: id});
12 12

  
13 13
    let headers = new HttpHeaders({'Content-Type': 'application/json', 'accept': 'application/json'});
14
    let url = properties.communityAPI + communityId + "/zenodocommunities";
14
    let url = properties.communityAPI + pid + "/zenodocommunities";
15 15

  
16 16
    //return this.http.delete(url, options);
17 17
    return this.http.request('delete', url, { body: id, headers: headers})
18 18
  }
19 19

  
20
  addZCommunity(properties:EnvProperties, communityId: string,zenodoid: string) {
20
  addZCommunity(properties:EnvProperties, pid: string,zenodoid: string) {
21 21
      //let headers = new Headers({'Content-Type': 'application/json'});
22 22
      //let options = new RequestOptions({headers: headers});
23 23

  
24 24
    let headers = new HttpHeaders({'Content-Type': 'application/json'});
25 25

  
26
      let url = properties.communityAPI+communityId+"/zenodocommunities";
26
      let url = properties.communityAPI+pid+"/zenodocommunities";
27 27
      var zCommunity: any = {
28
        "communityId": communityId,
28
        "communityId": pid,
29 29

  
30 30
        "zenodoid": zenodoid
31 31
      };

Also available in: Unified diff