Expose auth repos in context; create routes commands
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-06-17 19:35:31 -05:00
parent 9796a7277e
commit 36b451c32b
14 changed files with 300 additions and 4 deletions

View File

@@ -224,6 +224,34 @@ export class Route extends AppClass {
super()
}
/**
* Get the string-form of the route.
*/
public getRoute(): string {
return this.route
}
/**
* Get the string-form method of the route.
*/
public getMethod(): HTTPMethod | HTTPMethod[] {
return this.method
}
/**
* Get collection of applied middlewares.
*/
public getMiddlewares(): Collection<{ stage: 'pre' | 'post', handler: RouteHandler }> {
return this.middlewares.clone()
}
/**
* Get the string-form of the route handler.
*/
public getDisplayableHandler(): string {
return typeof this.handler === 'string' ? this.handler : '(anonymous function)'
}
/**
* Returns true if this route matches the given HTTP verb and request path.
* @param method