- Finish cleanup

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-01-22 23:11:10 -05:00
parent 2e7232bb65
commit a162b275a3
3 changed files with 32 additions and 8 deletions

View File

@@ -1,5 +1,7 @@
/**
* Checks if the event secret is correct
* It adds the following properties to the request object:
* - req.isEventAuthorized - Returns true if the event secret is correct
* @param req
* @param res
* @param next
@@ -9,6 +11,7 @@ function eventAuthorizationMiddleware(req, res, next) {
return res.status(401).send("Unauthorized");
}
req.isEventAuthorized = true;
next();
}