Skip to content

Commit

Permalink
HOTFIX make lime url configurable by backend
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Kurz committed Nov 8, 2023
1 parent 3e4d2ed commit 1b18acc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ public void activate(){
.forEach(data -> {
sdk.setPropertiesForParticipant(
Integer.parseInt(data.firstname()),
new ObservationProperties(Map.of("token", data.token()))
new ObservationProperties(
Map.of("token", data.token(),
"limeUrl", limeSurveyRequestService.getBaseUrl())
)
);
});
limeSurveyRequestService.setSurveyEndUrl(surveyId, sdk.getStudyId(), sdk.getObservationId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ protected LimeSurveyRequestService(HttpClient client, ComponentFactoryProperties
this.client = client;
}

protected String getBaseUrl() {
return Optional.ofNullable(properties.get("baseUrl")).map(String::valueOf).orElse(null);
}

protected void activateSurvey(String surveyId) {
try{
String sessionKey = getSessionKey();
Expand Down
1 change: 1 addition & 0 deletions studymanager/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ more:
lime-survey-observation:
username: '${LIME_ADMIN_USER:more-admin}'
password: '${LIME_ADMIN_PWD:more-admin}'
baseUrl: '${LIME_BASE_URL:lime.platform-test.more.redlink.io}'
remoteUrl: '${LIME_URL:https://lime.platform-test.more.redlink.io/admin/remotecontrol}'
surveyUrl: '${LIME_SURVEY_URL:https://lime.platform-test.more.redlink.io/index.php}'
endUrl: '${LIME_END_SURVEY_URL:https://studymanager.platform-test.more.redlink.io/api/v1/components/observation/lime-survey-observation/end.html}'
Expand Down

0 comments on commit 1b18acc

Please sign in to comment.