-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave program
Description
Context: Across all these APIs (Auth, Clinics, Users), we need strict runtime validation to prevent bad data from hitting our controllers or database.
Location: apps/api/src/middlewares/validate.middleware.ts
Requirements:
- Implement a generic Zod validation middleware:
validateRequest(zodSchema). - Apply Zod schemas to all Phase 1 routes (
POST /auth/login,POST /clinics/register,POST /users). - Return beautifully formatted
400 Bad Requesterrors detailing exactly which fields failed.
Acceptance Criteria:
- Missing passwords or invalid emails are caught before the controller logic runs.
- The middleware is strongly typed, inferring
req.bodytypes for the controllers.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave program