12 lines
282 B
TypeScript
Raw Normal View History

2024-02-22 12:14:58 +00:00
import { FileSchema } from "~/server/db/schema/file";
import { transformJs } from "~/server/lib/transform-js";
export const serveJs = async (file: FileSchema) => {
let content = file.content || "";
// transform js
content = await transformJs(content);
return content;
};