const { errorHandler } = require('../util');

const validatePax = (pax, maxCapacity) => {
	if (pax > maxCapacity) {
		throw errorHandler('Pax cannot exceed the maximum capacity.', 400);
	}
};

module.exports = validatePax;
