@@ -1820,6 +1820,12 @@ class BioActivityController {
1820
1820
in = ParameterIn .PATH ,
1821
1821
required = true ,
1822
1822
description = " Activity id"
1823
+ ),
1824
+ @Parameter (
1825
+ name = " includeSiteData" ,
1826
+ in = ParameterIn .PATH ,
1827
+ description = " Include site data" ,
1828
+ schema = @Schema (type = " boolean" , defaultValue = " false" )
1823
1829
)
1824
1830
],
1825
1831
responses = [
@@ -1854,8 +1860,8 @@ class BioActivityController {
1854
1860
],
1855
1861
security = @SecurityRequirement (name = " auth" )
1856
1862
)
1857
- @Path (" ws/bioactivity/data/simplified/{id}" )
1858
- def getOutputForActivitySimplified (String id ){
1863
+ @Path (" ws/bioactivity/data/simplified/{id}/{includeSiteData} " )
1864
+ def getOutputForActivitySimplified (String id , boolean includeSiteData ){
1859
1865
String userId = userService. getCurrentUserId()
1860
1866
def activity = activityService. get(id)
1861
1867
String projectId = activity?. projectId
@@ -1872,6 +1878,10 @@ class BioActivityController {
1872
1878
model. error = " No project associated with the activity"
1873
1879
} else if (projectService. isUserAdminForProject(userId, projectId) || activityService. isUserOwnerForActivity(userId, activity?. activityId)) {
1874
1880
model = [activity : activity]
1881
+ if (includeSiteData) {
1882
+ model = activityAndOutputModel(activity, activity. projectId)
1883
+ }
1884
+
1875
1885
} else {
1876
1886
response. status = 401
1877
1887
model. error = " Access denied: User is not an owner of this activity ${ activity?.activityId} "
0 commit comments