Revision 55906
Added by Konstantina Galouni about 5 years ago
subscribe.service.ts | ||
---|---|---|
12 | 12 |
constructor(private http:HttpClient) { |
13 | 13 |
} |
14 | 14 |
getCommunitySubscribers(pid:string, url:string){ |
15 |
return this.http.get(url+"/community/"+pid+"/subscribers"); |
|
15 |
return this.http.get<any>(url+"/community/"+pid+"/subscribers");
|
|
16 | 16 |
//.map(res => <any> res.json()); |
17 | 17 |
} |
18 | 18 |
|
... | ... | |
43 | 43 |
} |
44 | 44 |
unSubscribeToCommunity(pid:string, email:string, url:string){ |
45 | 45 |
|
46 |
return this.http.post(url+"/community/"+pid+"/subscribers/delete", JSON.stringify([email]), this.getAuthOptionsWithBody()); |
|
46 |
return this.http.post<any>(url+"/community/"+pid+"/subscribers/delete", JSON.stringify([email]), this.getAuthOptionsWithBody());
|
|
47 | 47 |
//.map(res => <any> res.json()); |
48 | 48 |
} |
49 | 49 |
getCommunitiesSubscribedTo(email:string, url:string){ |
Also available in: Unified diff
[angular7 | Library]:
1. subscribe.service: Add return type <any> for post requests.
2. customOptions.class: In getAuthOptionsWithBody function change return type from any to {}.