1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Make routes wait until all asynchronous stuff are done

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen 2022-02-11 13:06:57 +02:00
parent afa9c10969
commit d099256c9a
No known key found for this signature in database
GPG Key ID: 8C6CFB2FFFE8F68A

View File

@ -46,8 +46,8 @@ export class Router {
constructor(routes: Route[]) {
routes.forEach(route => {
this.router.add({ method: route.method, path: route.path }, (request: LensApiRequest) => {
route.handler(request);
this.router.add({ method: route.method, path: route.path }, async (request: LensApiRequest) => {
await route.handler(request);
});
});
}