Skip to content

Commit

Permalink
debug: Remove log statements from TrRoutingServiceBackend's route
Browse files Browse the repository at this point in the history
reverts changes done in this file in 657976c

This log statements were wrongly placed as the request is a promise and
the log happened before awaiting for the promise completion.

Also, with the TransitRoutingService in the backend, this log is not
necessary anymore, as the caller already has log statements.
  • Loading branch information
tahini committed Sep 20, 2024
1 parent 4bbe2ce commit 43f0ecd
Showing 1 changed file with 8 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,23 +140,14 @@ class TrRoutingServiceBackend {
parameters: TrRoutingApi.TransitRouteQueryOptions,
hostPort: TrRoutingApi.HostPort = {}
): Promise<TrRoutingApi.TrRoutingV2.RouteResponse> {
const origDestStr = `${parameters.originDestination[0].geometry.coordinates.join(',')} to ${parameters.originDestination[1].geometry.coordinates.join(',')}`;
console.log(`tripRouting: Getting route from trRouting for ${origDestStr}`);
try {
const trRoutingQuery = this.routeOptionsToQueryString(parameters);

const result = this.request<TrRoutingApi.TrRoutingV2.RouteResponse>(
trRoutingQuery,
hostPort.host,
hostPort.port,
'v2/route'
);
console.log(`tripRouting: Done getting route from trRouting for ${origDestStr}`);
return result;
} catch (error) {
console.log(`tripRouting: Error getting route from trRouting for ${origDestStr}`);
throw error;
}
const trRoutingQuery = this.routeOptionsToQueryString(parameters);

return this.request<TrRoutingApi.TrRoutingV2.RouteResponse>(
trRoutingQuery,
hostPort.host,
hostPort.port,
'v2/route'
);
}

summary(parameters: TrRoutingApi.TransitRouteQueryOptions): Promise<TrRoutingApi.TrRoutingV2.SummaryResponse> {
Expand Down

0 comments on commit 43f0ecd

Please sign in to comment.