Skip to content

Commit 659e620

Browse files
authored
Merge pull request #304 from firzanarmani/patch-1
fix: Drizzle docs
2 parents e90c082 + 501c60d commit 659e620

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/integrations/drizzle.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ const user = sqliteTable('user', {
3737
password: text('password').notNull(),
3838
})
3939

40-
const createUser = createInsertSchema(Table.character)
40+
const createUser = createInsertSchema(user)
4141

4242
const auth = new Elysia({ prefix: '/auth' })
4343
.put(
4444
'/sign-up',
4545
({ body }) => createUser(body),
4646
{
47-
body: t.Omit(createUser, 'id')
47+
body: t.Omit(createUser, ['id'])
4848
}
4949
)
5050
```
@@ -64,7 +64,7 @@ const user = sqliteTable('user', {
6464
image: text('image')
6565
})
6666

67-
const createUser = createInsertSchema(Table.character, {
67+
const createUser = createInsertSchema(user, {
6868
image: t.File({ // [!code ++]
6969
type: 'image', // [!code ++]
7070
maxSize: '2m' // [!code ++]
@@ -80,7 +80,7 @@ const auth = new Elysia({ prefix: '/auth' })
8080
return createUser({ image: imageURL, ...body }) // [!code ++]
8181
},
8282
{
83-
body: t.Omit(createUser, 'id')
83+
body: t.Omit(createUser, ['id'])
8484
}
8585
)
86-
```
86+
```

0 commit comments

Comments
 (0)