Skip to content

Commit

Permalink
Update hubeau_temperature_viewer.html sort desc
Browse files Browse the repository at this point in the history
  • Loading branch information
amandine-sahl authored Dec 15, 2023
1 parent 1dd678d commit 890e0e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hubeau_temperature_viewer.html
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ <h1>Détail station</h1>
}

function download() {
const url = `https://hubeau.eaufrance.fr/api/v1/temperature/chronique.csv?code_station=${current_station}&limit=20000&sort=asc`
const url = `https://hubeau.eaufrance.fr/api/v1/temperature/chronique.csv?code_station=${current_station}&limit=20000&sort=desc`

// Download the CSV file
let anchor = document.createElement('a');
Expand Down Expand Up @@ -214,7 +214,7 @@ <h1>Détail station</h1>
nb_pages = (nb_donnees / 10000 ) + 1
}

fetch(`https://hubeau.eaufrance.fr/api/v1/temperature/chronique?format=json&code_station=${code_station}&sort=asc&limit=10000&page=${page}&`+ new URLSearchParams(extra_params) )
fetch(`https://hubeau.eaufrance.fr/api/v1/temperature/chronique?format=json&code_station=${code_station}&sort=desc&limit=10000&page=${page}&`+ new URLSearchParams(extra_params) )
.then(response => {
return response.json()
})
Expand Down

0 comments on commit 890e0e6

Please sign in to comment.