import { log } from "@server/logger";

export default eventHandler((ev) => {
	let chapParam = getRouterParams(ev).chapter;
	log.silly(JSON.stringify(getRouterParams(ev)), { label: "sigh" });
	ev.context.chapterIndex = !!chapParam ? parseInt(chapParam) - 1 : 0;
});
