fix: deprecated json response method (#488)
* fix deprecated json response method * apply changesetspull/489/head
parent
4194ac691a
commit
1cc5e0a5b0
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
'@hono/swagger-ui': patch
|
||||
'@hono/typebox-validator': patch
|
||||
'@hono/typia-validator': patch
|
||||
---
|
||||
|
||||
Fixed a part of deprecated response json method in hono since v4.
|
|
@ -91,7 +91,7 @@ app.openapi(
|
|||
}
|
||||
}),
|
||||
(c) => {
|
||||
return c.jsonT({
|
||||
return c.json({
|
||||
message: 'hello'
|
||||
})
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ describe('Basic', () => {
|
|||
|
||||
const route = app.post('/author', tbValidator('json', schema), (c) => {
|
||||
const data = c.req.valid('json')
|
||||
return c.jsonT({
|
||||
return c.json({
|
||||
success: true,
|
||||
message: `${data.name} is ${data.age}`,
|
||||
})
|
||||
|
|
|
@ -17,7 +17,7 @@ interface Author {
|
|||
|
||||
const route = app.post('/author', typiaValidator('json', validate), (c) => {
|
||||
const data = c.req.valid('json')
|
||||
return c.jsonT({
|
||||
return c.json({
|
||||
success: true,
|
||||
message: `${data.name} is ${data.age}`,
|
||||
})
|
||||
|
|
|
@ -19,7 +19,7 @@ describe('Basic', () => {
|
|||
|
||||
const route = app.post('/author', typiaValidator('json', validate), (c) => {
|
||||
const data = c.req.valid('json')
|
||||
return c.jsonT({
|
||||
return c.json({
|
||||
success: true,
|
||||
message: `${data.name} is ${data.age}`,
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue