Skip to content

Commit

Permalink
HOTFIX make lime url configurable by backend (#214)
Browse files Browse the repository at this point in the history
* HOTFIX make lime url configurable by backend

* HOTFIX adapt baseUrl to align it with other config

---------

Co-authored-by: Thomas Kurz <[email protected]>
  • Loading branch information
tkurz and Thomas Kurz authored Nov 9, 2023
1 parent c28d087 commit a85519f
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:https://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 a85519f

Please sign in to comment.