Commit 3c3d52ce authored by Jie Yuan's avatar Jie Yuan
Browse files

add /api/site/{sitename} endpoint to fetch a site

parent fc24568e
......@@ -343,6 +343,29 @@ public class SiteEndpoint {
return res;
}
/**
*
* get a site with a specific site name
*
*/
@GetMapping("/{siteName}")
public Site getASiteBySiteName(@PathVariable("siteName") final String siteName) throws Exception{
if( siteName.equals("")) {
log.error("the site name is empty for path /api/site/{siteName}");
return null;
}
Site site = this.siteController.getSiteByIdOrException(siteName);
return site;
}
/**
*
*
......
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