2018-03-29 16:15:47 +02:00
|
|
|
import {Injectable} from '@angular/core';
|
|
|
|
import {Http} from '@angular/http';
|
|
|
|
import{EnvProperties} from '../../utils/properties/env-properties';
|
|
|
|
|
|
|
|
@Injectable()
|
2018-04-04 14:35:31 +02:00
|
|
|
export class SearchCommunityProjectsService {
|
2018-03-29 16:15:47 +02:00
|
|
|
constructor(private http: Http ) {}
|
|
|
|
|
2018-04-04 14:35:31 +02:00
|
|
|
searchProjects (properties:EnvProperties, communityId: string):any {
|
|
|
|
let url = properties.communityAPI+communityId+"/projects";
|
2018-03-29 16:15:47 +02:00
|
|
|
|
|
|
|
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
|
|
|
|
.map(res => <any> res.json())
|
|
|
|
}
|
|
|
|
}
|