expose endpoint into req

This commit is contained in:
srgooglo 2021-07-08 11:17:42 +02:00
parent 41a6db79d9
commit 1b09d15740

View File

@ -106,6 +106,7 @@ class Server {
handleRequest = (req, res, next, endpoint) => { handleRequest = (req, res, next, endpoint) => {
const { route, method, controller } = endpoint const { route, method, controller } = endpoint
req.requestId = nanoid() req.requestId = nanoid()
req.endpoint = endpoint
// exec controller // exec controller
if (typeof controller.exec === "function") { if (typeof controller.exec === "function") {