Commit bcafd96
committed
fix(og): map 'foreign beer' category to international-beer API endpoint
The OG preview handler derives the API endpoint name directly from the
URL's category param. For foreign beer drinks the category field value
is 'foreign beer' (with a space) but the API endpoint is
'international-beer', so the handler fetched a non-existent URL and
silently fell back to the plain SPA — no OG metadata was injected.
Add a CATEGORY_TO_ENDPOINT lookup in fetchDrinkData so 'foreign beer'
resolves to 'international-beer.json', matching what the Flutter app
uses when loading these drinks.1 parent ec87295 commit bcafd96
2 files changed
Lines changed: 19 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
15 | 20 | | |
16 | 21 | | |
17 | 22 | | |
| |||
59 | 64 | | |
60 | 65 | | |
61 | 66 | | |
62 | | - | |
| 67 | + | |
| 68 | + | |
63 | 69 | | |
64 | 70 | | |
65 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
266 | 278 | | |
267 | 279 | | |
0 commit comments