import FetchResult from '../common/web/fetchResult.js' exports.authenticateSession = async (req, res, next) => { if (req.session.user) { next() } else { return FetchResult.formatResult(res, HTTP_STATUS.UNAUTHORIZED, 'Unauthorized') } }