Expose auth repos in context; create routes commands
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user