const { authJwt } = require("../middleware"); const controller = require("../controllers/bullpenSession.controller"); module.exports = function(app) { app.use(function(req, res, next) { res.header( "Access-Control-Allow-Headers", "x-access-token, Origin, Content-Type, Accept" ); next(); }); app.post( "/api/bullpen_session", [authJwt.verifyToken], controller.insert); app.get( "/api/bullpen_session", [authJwt.verifyToken], controller.findAll); app.get( "/api/bullpen_session/:id", [authJwt.verifyToken], controller.findOne); app.get( "/api/bullpen_session/summary", [authJwt.verifyToken], controller.summaryForPlayer); };