ae-utbm / sith

🌐 The website of the AE
https://ae-utbm.github.io/sith/
GNU General Public License v3.0
6 stars 4 forks source link

fix: `fetch_paginated` #830

Closed imperosol closed 1 month ago

imperosol commented 1 month ago

La fonction fetch_paginated est cassée. quand on a besoin de faire des appels en plus, le Promise.all() retourne un tableau de tableaux. Ca fait que quand on fait result.push(...await Promise.all(promises)), au lieu de se retrouver avec [a, b, c, d, e, f, g, h], on se retrouve avec [a, b, c, [d, e, f], [g, h]].

Bref, on avait oublié le flatten.

En test, on a pas d'album avec plus de 200 photos, donc on l'avait juste pas vu.