Skip to content

Commit

Permalink
more logs for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
benbaja committed Nov 5, 2024
1 parent f86e6ff commit 869f8aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ cron.schedule('0 0 * * *', () => {
});

app.get('/api', checkQueryParams, (req: Request, res: Response) => {
console.log(req.body)
const params = {
startPos: {latitude: parseFloat(req.query.startLat as string), longitude: parseFloat(req.query.startLon as string)},
minRate: parseInt(req.query.minRate as string) || 1,
Expand Down
3 changes: 2 additions & 1 deletion server/src/velib-stations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ class VelibRes {
private perimeter: number

constructor(params: VelibResParams) {
console.log("Creating Velib Response object")
this.parameters = params
this.perimeter = 400 // in meters
this.allStations = this.fetchAllStations()
Expand All @@ -154,9 +155,9 @@ class VelibRes {
}

private async fetchAllStations() {
console.log("fetching all stations")
const velibRes = await fetch('https://www.velib-metropole.fr/api/map/details?gpsTopLatitude=49.05546&gpsTopLongitude=2.662193&gpsBotLatitude=48.572554&gpsBotLongitude=1.898879&zoomLevel=1', reqInit)
const allStations = await velibRes.json() as any as StationStatus[]
console.log("fetched all stations!")
return allStations.map((stationStatus) => new Station(stationStatus))
}

Expand Down

0 comments on commit 869f8aa

Please sign in to comment.