Skip to content

Commit

Permalink
add config to connect to the DB
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaffter committed Oct 12, 2024
1 parent cf7929b commit 81cbd04
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package org.sagebionetworks.agora.api.api;

import org.sagebionetworks.agora.api.model.dto.DataversionDto;
import org.sagebionetworks.agora.api.service.DataVersionService;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;

@Component
public class DataversionApiDelegateImpl implements DataversionApiDelegate {

private final DataVersionService dataVersionService;

public DataversionApiDelegateImpl(DataVersionService dataVersionService) {
this.dataVersionService = dataVersionService;
}

@Override
public ResponseEntity<DataversionDto> getDataversion() {
return ResponseEntity.ok(dataVersionService.getDataVersion());
}
}
3 changes: 3 additions & 0 deletions apps/agora/api-spring/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ spring:
date-format: org.sagebionetworks.agora.api.RFC3339DateFormat
serialization:
WRITE_DATES_AS_TIMESTAMPS: false
data:
mongodb:
uri: mongodb://root:changeme@agora-mongo:27017/agora?authSource=admin
# zipkin:
# base-url: http://openchallenges-zipkin:9411

Expand Down

0 comments on commit 81cbd04

Please sign in to comment.