Skip to content

Commit

Permalink
Merge pull request #39 from AtB-AS/remove-agent-routes
Browse files Browse the repository at this point in the history
refactor: wipe agent service/routes
  • Loading branch information
torfjor authored Jul 27, 2020
2 parents e9c3ebf + c6da56f commit 811888d
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 196 deletions.
46 changes: 0 additions & 46 deletions src/api/agent/index.ts

This file was deleted.

16 changes: 0 additions & 16 deletions src/api/agent/schema.ts

This file was deleted.

5 changes: 0 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@ import enturClient from './service/impl/entur';
import geocoderService from './service/impl/geocoder';
import stopsService from './service/impl/stops';
import journeyService from './service/impl/journey';
import agentService from './service/impl/agent';

import geocoderRoutes from './api/geocoder';
import stopsRoutes from './api/stops';
import journeyRoutes from './api/journey';
import agentRoutes from './api/agent';
import healthRoutes from './api/health';

import registerMetricsExporter from './utils/metrics';
Expand Down Expand Up @@ -57,9 +55,6 @@ process.on('unhandledRejection', err => {
stopsRoutes(server)(stopsService(enturService));
geocoderRoutes(server)(geocoderService(enturService, pubSubClient));
journeyRoutes(server)(js);
agentRoutes(server)(
agentService(stopsService(enturService), js)
);

registerMetricsExporter(projectId);
await server.initialize();
Expand Down
106 changes: 0 additions & 106 deletions src/service/impl/agent.ts

This file was deleted.

12 changes: 0 additions & 12 deletions src/service/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ import {
DeparturesFromStopPlaceQuery,
FeaturesQuery,
NearestPlacesQuery,
NextDepartureFromCoordinateQuery,
NextDepartureFromStopQuery,
QuaysForStopPlaceQuery,
ReverseFeaturesQuery,
StopPlaceQuery,
Expand All @@ -35,16 +33,6 @@ import {
DepartureRealtimeQuery,
DeparturesFromLocationPagingQuery
} from './types';
import { AgentError } from './impl/agent';

export interface IAgentService {
getNextDepartureBetweenStops(
query: NextDepartureFromStopQuery
): Promise<Result<string, AgentError>>;
getNextDepartureFromCoordinate(
query: NextDepartureFromCoordinateQuery
): Promise<Result<string, AgentError>>;
}

export interface IGeocoderService {
getFeatures(query: FeaturesQuery): Promise<Result<Feature[], APIError>>;
Expand Down
11 changes: 0 additions & 11 deletions src/service/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,22 +140,11 @@ export interface DeparturesForServiceJourneyQuery {
date?: Date;
}

export interface NextDepartureFromStopQuery {
from: string;
to: string;
}

export interface DeparturesBetweenStopPlacesParams {
limit?: number;
start?: Date;
}

export type NextDepartureFromCoordinateQuery = {
lat: number;
lon: number;
to: string;
};

export type DeparturesByIdWithStopName = DeparturesById & {
name: string;
};
Expand Down

0 comments on commit 811888d

Please sign in to comment.