remove get communities services - available in community profile

update search in projects size and fix count query
This commit is contained in:
argirok 2023-07-14 13:55:47 +03:00
parent 3ee4129c7e
commit 1355f2cdb5
3 changed files with 2 additions and 38 deletions

View File

@ -7,14 +7,14 @@ import {map} from "rxjs/operators";
export class SearchCommunityProjectsService {
constructor(private http: HttpClient ) {}
searchProjects (properties:EnvProperties, pid: string, page=0, size=100):any {
searchProjects (properties:EnvProperties, pid: string, page=0, size=500):any {
let url = properties.communityAPI+pid+"/projects/"+ page + "/" + size;
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url);
//.map(res => <any> res.json())
}
countTotalProjects(properties:EnvProperties,pid:string) {
let url = properties.communityAPI+pid+"/projects/0/0";
let url = properties.communityAPI+pid+"/projects/0/1";
return this.http.get((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
.pipe(map(res => res['totalElements']));
}

View File

@ -1,15 +0,0 @@
import {Injectable} from '@angular/core';
import {HttpClient} from "@angular/common/http";
import{EnvProperties} from '../../utils/properties/env-properties';
@Injectable()
export class SearchZenodoCommunitiesService {
constructor(private http: HttpClient ) {}
searchZCommunities (properties:EnvProperties, pid: string):any {
let url = properties.communityAPI+pid+"/zenodocommunities";
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url);
//.map(res => <any> res.json())
}
}

View File

@ -1,21 +0,0 @@
import { NgModule} from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import {SearchZenodoCommunitiesService} from './searchZenodoCommunities.service';
@NgModule({
imports: [
CommonModule, FormsModule
],
declarations: [
],
providers:[
SearchZenodoCommunitiesService
],
exports: [
]
})
export class SearchZenodoCommunitiesServiceModule { }