mirror of
https://github.com/honojs/hono.git
synced 2024-11-25 13:19:30 +01:00
refactor(hono-base): use object abbreviation notation (#3640)
This commit is contained in:
parent
4598d7a20f
commit
48d2adcf73
@ -377,7 +377,7 @@ class Hono<E extends Env = Env, S extends Schema = {}, BasePath extends string =
|
|||||||
#addRoute(method: string, path: string, handler: H) {
|
#addRoute(method: string, path: string, handler: H) {
|
||||||
method = method.toUpperCase()
|
method = method.toUpperCase()
|
||||||
path = mergePath(this._basePath, path)
|
path = mergePath(this._basePath, path)
|
||||||
const r: RouterRoute = { path: path, method: method, handler: handler }
|
const r: RouterRoute = { path, method, handler }
|
||||||
this.router.add(method, path, [handler, r])
|
this.router.add(method, path, [handler, r])
|
||||||
this.routes.push(r)
|
this.routes.push(r)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user