adding constructor argument to hapi__call (#43774)

This commit is contained in:
Rodrigo Saboya
2020-04-14 20:28:06 -07:00
committed by GitHub
parent db069750c2
commit ed0c02c9d4
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
import { Route, Router } from '@hapi/call';
const router = new Router();
const router = new Router({ isCaseSensitive: false });
router.add({ method: 'get', path: '/user/{userId}'}, { id: 'get_user'});
+1
View File
@@ -23,6 +23,7 @@ export interface Match<P = any, D = any> {
export type Route<P = any, D = any> = Match<P, D> | Error;
export class Router {
constructor(routerOptions?: RouterOptions)
add(definition: RouteDefinition, data?: any): void;
route(method: string, path: string): Route;
}