diff --git a/bun.lockb b/bun.lockb index d5bff90..bd6f45c 100644 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/docs/recipe/drizzle.md b/docs/recipe/drizzle.md index a44cc8b..596de9f 100644 --- a/docs/recipe/drizzle.md +++ b/docs/recipe/drizzle.md @@ -113,7 +113,7 @@ export type Table = typeof table ::: code-group ```ts [src/index.ts] -import { createSelectSchema } from 'drizzle-typebox' +import { createInsertSchema } from 'drizzle-typebox' import { Table } from './database/schema' const _createUser = createInsertSchema(table.user, { @@ -144,7 +144,7 @@ new Elysia() 为了避免这种情况,我们需要 **在 `drizzle-typebox` 和 `Elysia` 模式之间显式定义一个类型**: ```ts import { t } from 'elysia' -import { createSelectSchema } from 'drizzle-typebox' +import { createInsertSchema } from 'drizzle-typebox' import { table } from './database/schema' diff --git a/docs/tutorial.md b/docs/tutorial.md index a87af43..4293805 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -846,8 +846,8 @@ export const user = new Elysia({ prefix: '/user' })// [!code ++] 2. 在该实例中,我们定义了一个内存存储 `user` 和 `session` - 2.1 `user` 将保存 `username` 和 `password` 的键值对 - 2.2 `session` 将保存 `session` 和 `username` 的键值对 -3. 在 `/sign-in` 中,我们插入一个用户名和经过 argon2id 散列的密码 -4. 在 `/sign-up` 中我们做以下事情: +3. 在 `/sign-up` 中,我们插入一个用户名和经过 argon2id 散列的密码 +4. 在 `/sign-in` 中我们做以下事情: - 4.1 我们检查用户是否存在并验证密码 - 4.2 如果密码匹配,我们会在 `session` 中生成一个新会话 - 4.3 我们将 cookie `token` 设置为 session 的值