import "../../../../../base64-CmWvODNW.mjs";
import "../../../../../types-CuW0zWDA.mjs";
import { a as unwrapResult, t as apiError } from "../../../../../error-CkAseSqZ.mjs";
import { n as requirePerm } from "../../../../../authorize-Dz88F_Fw.mjs";

//#region src/astro/routes/api/revisions/[revisionId]/index.ts
const prerender = false;
const GET = async ({ params, locals }) => {
	const { emdash, user } = locals;
	const revisionId = params.revisionId;
	const denied = requirePerm(user, "content:read_drafts");
	if (denied) return denied;
	if (!emdash?.handleRevisionGet) return apiError("NOT_CONFIGURED", "EmDash not configured", 500);
	return unwrapResult(await emdash.handleRevisionGet(revisionId));
};

//#endregion
export { GET, prerender };
//# sourceMappingURL=index.mjs.map