[plugins-functionality | WIP] content providers: update methods, add options to select for deposit and add deposition message

This commit is contained in:
argirok 2024-02-28 14:46:29 +02:00
parent c011c9b38c
commit 9ad2da0fd3
2 changed files with 5 additions and 3 deletions

View File

@ -6,13 +6,13 @@ import {map} from "rxjs/operators";
@Injectable()
export class SearchCommunityDataprovidersService {
constructor(private http: HttpClient ) {}
searchDataproviders (properties:EnvProperties, pid: string):any {
let url = properties.communityAPI+pid+"/contentproviders";
searchDataproviders (properties:EnvProperties, pid: string, deposit = false):any {
let url = properties.communityAPI+pid+"/datasources" + (deposit?'?deposit=true':'');
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url);
}
countTotalDataproviders(properties:EnvProperties,pid:string) {
let url = properties.communityAPI+pid+"/contentproviders";
let url = properties.communityAPI+pid+"/datasources";
return this.http.get((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
.pipe(map(res => res['length']));
}

View File

@ -5,6 +5,8 @@ export class ContentProvider {
name: string;
officialname: string;
selectioncriteria: SelectionCriteria;
deposit: boolean;
message: string;
}
export class SelectionCriteria {