fix(hello): use `MiddlewareHandler`
parent
afe48fdb03
commit
cfd961df6b
|
@ -25,9 +25,9 @@
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/honojs/middleware",
|
"homepage": "https://github.com/honojs/middleware",
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"hono": "^2.6.2"
|
"hono": "^2.7.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"hono": "^2.6.2"
|
"hono": "^2.7.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
import type { Handler } from 'hono'
|
import type { MiddlewareHandler } from 'hono'
|
||||||
|
|
||||||
export const hello = (message: string = 'Hello!'): Handler => {
|
export const hello = (message: string = 'Hello!'): MiddlewareHandler => {
|
||||||
return async (c, next) => {
|
return async (c, next) => {
|
||||||
await next()
|
await next()
|
||||||
c.res.headers.append('X-Message', message)
|
c.res.headers.append('X-Message', message)
|
||||||
|
|
Loading…
Reference in New Issue