Files
outline/server/routes/api/BaseSchema.ts
Apoorv Mishra b6141442b7 Validate API request query (#4642)
* fix: refactor to accommodate authentication, transaction and pagination together into ctx.state

* feat: allow passing response type to APIContext

* feat: preliminary work for initial review

* fix: use unknown for base types

* fix: api/attachments

* fix: api/documents

* fix: jsdoc comment for input

* fix: replace at() with index access for compatibility

* fix: validation err message

* fix: error handling

* fix: remove unnecessary extend
2023-01-05 20:24:03 +05:30

9 lines
131 B
TypeScript

import { z } from "zod";
const BaseSchema = z.object({
body: z.unknown(),
query: z.unknown(),
});
export default BaseSchema;