From cb84903a1ac57aedba22752ee0a9fa44d8da59c9 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Wed, 3 Apr 2024 10:53:21 +1000 Subject: [PATCH] Switched to /ws/search endpoint for reference activities search --- .../org/ala/biocollect/ReferenceAssessmentController.groovy | 5 ++++- .../au/org/ala/biocollect/merit/ActivityService.groovy | 4 ---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy index 6f646f9b3..ff55649a1 100644 --- a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -100,7 +100,10 @@ class ReferenceAssessmentController { } // Get the activity records for the reference survey - def refActivities = activityService.activitiesForProjectActivity(config.reference.projectActivityId) + def refActivitiesSearch = activityService.search([ + projectActivityId: config.reference.projectActivityId + ]) + def refActivities = refActivitiesSearch.resp.activities def maxRecordsToCreate = config.assessment.maxRecordsToCreate as Integer // Ensure the reference records exist diff --git a/grails-app/services/au/org/ala/biocollect/merit/ActivityService.groovy b/grails-app/services/au/org/ala/biocollect/merit/ActivityService.groovy index 027e075ed..7288aec23 100644 --- a/grails-app/services/au/org/ala/biocollect/merit/ActivityService.groovy +++ b/grails-app/services/au/org/ala/biocollect/merit/ActivityService.groovy @@ -215,10 +215,6 @@ class ActivityService { list } - def activitiesForProjectActivity(String id) { - webService.getJson(grailsApplication.config.ecodata.service.url + '/activitiesForProjectActivity/' + id)?.list - } - def submitActivitiesForPublication(activityIds) { updatePublicationStatus(activityIds, 'pendingApproval') }