Skip to content

Commit 1b30b2b

Browse files
authored
🔧 fix: cookie & response schema-type (#234)
Corrected the `cookie` & `200` status code stable in the elysisa docs [example](https://elysiajs.com/validation/schema-type.html#example-5)
1 parent ccf6e80 commit 1b30b2b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/validation/schema-type.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ fetch('https://elysiajs.com/', {
261261
import { Elysia, t } from 'elysia'
262262

263263
new Elysia().get('/', ({ cookie }) => cookie.session.value, {
264-
params: t.Object({
264+
cookie: t.Object({
265265
session: t.String()
266266
})
267267
})
@@ -304,6 +304,6 @@ The validation should be as follows:
304304
| 'hello' | 200 ||
305305
| 1 | 200 ||
306306
| 'hello' | 400 ||
307-
| 1 | 200 ||
307+
| 1 | 400 ||
308308
| `false` | 200 ||
309309
| `false` | 400 ||

0 commit comments

Comments
 (0)