Management API and tools

This commit is contained in:
oitsjustjose 2023-04-24 19:38:35 -05:00
commit 9b81a6cc8b
15 changed files with 222 additions and 149 deletions

View file

@ -0,0 +1,10 @@
import { NextFunction, Request, Response } from "express";
export default () => {
return (req: Request, res: Response, next: NextFunction) => {
if (!req.query.mgmtKey || req.query.mgmtKey != process.env.MGMT_KEY) {
return res.status(403).send(`Key is not authorized`);
}
return next();
};
};