pycontw / pycontw-frontend

The official website for PyCon TW 🐍
16 stars 36 forks source link

fix(dev): json-server does not return correct speech data #551

Closed mattwang44 closed 2 months ago

mattwang44 commented 2 months ago

Types of changes

Description

issue: https://github.com/pycontw/pycontw-frontend/pull/550#issuecomment-2202667612

the behavior of how json-server reads the route settings seems to be changed.

When requesting /api/events/speeches/category/:category, the json-server incorrectly matches the route /api/events/speeches/:event_type/:id (take category as even type, and :category as the id). Changing the sequence in routes.json solves this issue.

SivanYeh commented 2 months ago

It worked! LGTM!