bigly-chat/route.js

13 lines
287 B
JavaScript
Raw Normal View History

2024-11-25 14:12:43 -05:00
function Route(deps, exec) {
this.deps = deps;
this.exec = exec;
}
Route.prototype.run = async function (req, res, input) {
for (let dep of this.deps) {
input = await dep.run(req, res, input)
};
return await this.exec(req,res,input);
}
export default Route;