Add common app routes to the protocol renderer router (#2272)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-03-17 13:57:49 -04:00
1 parent ca39379b3a
commit 0561f6bfd0
17 files changed
+129 -33

No files matched your search

+3 -1
View File
@@ -184,10 +184,12 @@ export abstract class LensProtocolRouter extends Singleton {
* @param pathSchema the URI path schema to match against for this handler
* @param handler a function that will be called if a protocol path matches
*/
public addInternalHandler(urlSchema: string, handler: RouteHandler): void {
public addInternalHandler(urlSchema: string, handler: RouteHandler): this {
pathToRegexp(urlSchema); // verify now that the schema is valid
logger.info(`${LensProtocolRouter.LoggingPrefix}: internal registering ${urlSchema}`);
this.internalRoutes.set(urlSchema, handler);
return this;
}
/**