Commit b5604277 authored by Jie Yuan's avatar Jie Yuan
Browse files

site endpoint with sitenameandsource payload response

parent 6d80da50
......@@ -687,7 +687,7 @@ public class SiteEndpoint {
Iterable<Site> allSites = this.getAllDPMTSites();
List<SiteNameAndSource> res = new ArrayList();
for ( Site tmp: allSites ) {
SiteNameAndSource siteTmp = new SiteNameAndSource(tmp.getIdname(),tmp.getSourceInformation());
SiteNameAndSource siteTmp = new SiteNameAndSource(tmp.getIdName(),tmp.getSourceInformation(),tmp.getIdSite());
res.add(siteTmp);
}
......@@ -706,10 +706,10 @@ public class SiteEndpoint {
@GetMapping("/siteNamesAndSources/gocdb/all")
public List<SiteNameAndSource> getAllGOCDBSiteNamesAndSources(){
Iterable<Site> allSites = this.getAllDPMTSites();
Iterable<Site> allSites = this.getAllGOCDBSites();
List<SiteNameAndSource> res = new ArrayList();
for ( Site tmp: allSites ) {
SiteNameAndSource siteTmp = new SiteNameAndSource(tmp.getIdname(),tmp.getSourceInformation(),tmp.getIdSite());
SiteNameAndSource siteTmp = new SiteNameAndSource(tmp.getIdName(),tmp.getSourceInformation(),tmp.getIdSite());
res.add(siteTmp);
}
......@@ -728,11 +728,11 @@ public class SiteEndpoint {
@GetMapping("/siteNamesAndSources/eosc/all")
public List<SiteNameAndSource> getAllEOSCSiteNamesAndSources(){
Iterable<Site> allSites = this.getAllDPMTSites();
Iterable<Site> allSites = this.getAllSites();
List<SiteNameAndSource> res = new ArrayList();
for ( Site tmp: allSites ) {
if (tmp.getScopeList().isEmpty() == false && tmp.getScopeList().contains("cms")) {
SiteNameAndSource siteTmp = new SiteNameAndSource(tmp.getIdname(),tmp.getSourceInformation(),tmp.getIdSite());
SiteNameAndSource siteTmp = new SiteNameAndSource(tmp.getIdName(),tmp.getSourceInformation(),tmp.getIdSite());
res.add(siteTmp);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment