0
0
mirror of https://github.com/honojs/hono.git synced 2024-11-21 18:18:57 +01:00

refactor(hono-base): use object abbreviation notation (#3640)

This commit is contained in:
EdamAmex 2024-11-07 15:43:17 +09:00 committed by GitHub
parent 4598d7a20f
commit 48d2adcf73
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -377,7 +377,7 @@ class Hono<E extends Env = Env, S extends Schema = {}, BasePath extends string =
#addRoute(method: string, path: string, handler: H) {
method = method.toUpperCase()
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.routes.push(r)
}