Skip to content

Commit

Permalink
fix: osrm url as env param (#2328)
Browse files Browse the repository at this point in the history
  • Loading branch information
nmrgt authored Nov 28, 2023
1 parent 1db6bd9 commit c7a587f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/providers/geo/src/providers/OSRMProvider.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { get } from 'lodash';
import axios from 'axios';
import { provider } from '@ilos/common';
import { env } from '@ilos/core';

import { PointInterface, RouteMetaProviderInterface, RouteMeta } from '../interfaces';

@provider()
export class OSRMProvider implements RouteMetaProviderInterface {
protected domain = 'http://osrm.covoiturage.beta.gouv.fr:5000';
protected domain = env.or_fail("OSRM_URL", 'http://osrm.covoiturage.beta.gouv.fr:5000');

async getRouteMeta(start: PointInterface, end: PointInterface): Promise<RouteMeta> {
try {
Expand Down

0 comments on commit c7a587f

Please sign in to comment.