coryhouse / coryhouse/react-restaurant-scriptpro

Install ky + getFoods with Zod validation

Open
#10 0 comments 0 reactions 0 assignees View on GitHub
enhancement phase-2-fetching
Dominant language
TypeScript
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

## Goal
Use `ky` to fetch the foods list and validate the response with the Zod schema before returning it. (We use `ky` rather than `fetch` or `axios` — small, ergonomic, typed.)

## Acceptance criteria
- [ ] `ky` installed
- [ ] `getFoods` calls the API and returns `Food[]`
- [ ] Invalid responses throw a clear Zod validation error
- [ ] No other HTTP client (`axios`, raw `fetch`) used in this function

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.