[Library | Trunk]: Community Service clear comments and unused imports
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60737 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
4214b08f87
commit
f747c9314f
|
@ -1,12 +1,9 @@
|
|||
import {Injectable} from '@angular/core';
|
||||
import {HttpClient, HttpHeaders} from "@angular/common/http";
|
||||
import {CommunityInfo} from './communityInfo';
|
||||
import {EnvProperties} from '../../utils/properties/env-properties';
|
||||
import {map} from "rxjs/operators";
|
||||
import {BehaviorSubject, from, Observable, Subscriber} from "rxjs";
|
||||
import {properties} from "../../../../environments/environment";
|
||||
import {HelperFunctions} from "../../utils/HelperFunctions.class";
|
||||
import {Stakeholder} from "../../monitor/entities/stakeholder";
|
||||
import {StringUtils} from "../../utils/string-utils.class";
|
||||
|
||||
@Injectable({providedIn: 'root'})
|
||||
|
@ -55,7 +52,6 @@ export class CommunityService {
|
|||
|
||||
async getCommunityAsync() {
|
||||
await this.promise;
|
||||
this.clearSubscriptions();
|
||||
return this.community.getValue();
|
||||
}
|
||||
|
||||
|
@ -72,8 +68,6 @@ export class CommunityService {
|
|||
|
||||
|
||||
updateCommunity(url: string, community: any) {
|
||||
//const headers = new Headers({'Content-Type': 'application/json'});
|
||||
//const options = new RequestOptions({headers: headers});
|
||||
if (!community.logoUrl) {
|
||||
community.logoUrl = '';
|
||||
}
|
||||
|
@ -82,10 +76,7 @@ export class CommunityService {
|
|||
'Content-Type': 'application/json',
|
||||
})
|
||||
};
|
||||
|
||||
const body = JSON.stringify(community);
|
||||
return this.http.post(url, body, options);
|
||||
/*.map(res => res.json())*/
|
||||
return this.http.post(url, community, options);
|
||||
}
|
||||
|
||||
public parseCommunity(data: any): CommunityInfo {
|
||||
|
|
Loading…
Reference in New Issue