Skip to content

Commit

Permalink
Hack pour Paris qui pète en 11-2023, voir branche
Browse files Browse the repository at this point in the history
  • Loading branch information
laem committed Nov 1, 2023
1 parent d7c7d49 commit 1a4b1a7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,15 @@ app.get(
'/api/:dimension/:scope/:ville/:date/:algorithmVersion',
cache('1 day', onlyStatus200),
async function (req, res) {
const { ville, scope, dimension, date, algorithmVersion } = req.params
const {
ville,
scope,
dimension,
date: rawDate,
algorithmVersion,
} = req.params
const date =
dimension === 'walking' && ville === 'Paris' ? '10-2023' : rawDate
console.log(
'API request : ',
dimension,
Expand Down
1 change: 1 addition & 0 deletions web/app/APIUrl.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const url = `https://api.villes.plus/`
//const url = `http://localhost:3000/`

export default url

1 comment on commit 1a4b1a7

@vercel
Copy link

@vercel vercel bot commented on 1a4b1a7 Nov 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.