1. Remove duplicate/broken code in product tables section 2. Fix PostCSS config for Tailwind 4 3. Add @tailwindcss/postcss dependency 4. Remove --production flag from Dockerfile (sharp required) All fixes enable successful Docker build with favicon working.
24 lines
622 B
JavaScript
24 lines
622 B
JavaScript
import { getActionContext } from "./server.js";
|
|
const POST = async (context) => {
|
|
const { action, serializeActionResult } = getActionContext(context);
|
|
if (action?.calledFrom !== "rpc") {
|
|
return new Response("Not found", { status: 404 });
|
|
}
|
|
const result = await action.handler();
|
|
const serialized = serializeActionResult(result);
|
|
if (serialized.type === "empty") {
|
|
return new Response(null, {
|
|
status: serialized.status
|
|
});
|
|
}
|
|
return new Response(serialized.body, {
|
|
status: serialized.status,
|
|
headers: {
|
|
"Content-Type": serialized.contentType
|
|
}
|
|
});
|
|
};
|
|
export {
|
|
POST
|
|
};
|