import { H as HttpError } from "./http-error-RJXCPZV2.js";
function checkSession(req) {
  if (!req.session?.user?.id) {
    throw new HttpError({ statusCode: 401, message: "Unauthorized" });
  }
  return req.session;
}
export {
  checkSession as c
};
