Skip to content

Commit

Permalink
Amend route after addition of debug feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerry350 committed Dec 14, 2020
1 parent 1e3e5db commit ca592f0
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const createNetworkEventsRoute: UMRestApiRouteFactory = (libs: UMServerLi
stepIndex: schema.number(),
}),
},
handler: async ({ uptimeEsClient }, _context, request, response) => {
handler: async ({ uptimeEsClient, request }): Promise<any> => {
const { checkGroup, stepIndex } = request.query;

const result = await libs.requests.getNetworkEvents({
Expand All @@ -26,10 +26,8 @@ export const createNetworkEventsRoute: UMRestApiRouteFactory = (libs: UMServerLi
stepIndex,
});

return response.ok({
body: {
events: result,
},
});
return {
events: result,
};
},
});

0 comments on commit ca592f0

Please sign in to comment.