Skip to content

Commit

Permalink
fix: use header values
Browse files Browse the repository at this point in the history
  • Loading branch information
zabuTNT committed Oct 20, 2023
1 parent b7c70da commit 11df08f
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ public class VehicleRentalUpdater extends PollingGraphUpdater {
private StreetSplitter splitter;

private String network;

private String headerName;
private String headerValue;
private String language;

private VehicleRentalStationService service;

Expand All @@ -77,11 +81,15 @@ protected void runPolling() {
@Override
protected void configurePolling(Graph graph, JsonNode config) throws Exception {
network = config.path("network").asText();
headerName = config.has("headerName") ? config.path("headerName").asText() : null;
headerValue = config.has("headerValue") ? config.path("headerValue").asText() : null;
language = config.has("language") ? config.path("language").asText() : "en";

VehicleRentalDataSource source = null;
String sourceType = config.path("sourceType").asText();
if (sourceType != null) {
if (sourceType.equals("gbfs")) {
source = new GenericGbfsService();
source = new GenericGbfsService(headerName, headerValue, language);
}
}

Expand Down

0 comments on commit 11df08f

Please sign in to comment.