const { allowRate } = require("./rateLimit"); const { AppError } = require("../utils/errors"); function assertUserCanCreateJob(userId) { if (!allowRate(`jobs:${userId}`, 12, 60 * 60 * 1000)) { throw new AppError("Rate limit reached. Please wait before sending more videos.", "RATE_LIMITED"); } } module.exports = { assertUserCanCreateJob };