"use strict";
const httpError = require("./http-error-mkY8Ke7V.cjs");
function checkSession(req) {
  if (!req.session?.user?.id) {
    throw new httpError.HttpError({ statusCode: 401, message: "Unauthorized" });
  }
  return req.session;
}
exports.checkSession = checkSession;
