More cleanup

This commit is contained in:
Dominic Ferrando
2026-06-26 16:36:01 -04:00
parent b3e7d9a251
commit aa9ba61a9a
3 changed files with 30 additions and 34 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
import { Printful, PrintfulClient, PrintfulError, Webflow, WebflowClient, WebflowError } from "@blade-and-brawn/commerce";
import { env } from "../env";
const BASE_URL = "https://dev.api.bladeandbrawn.com";
const BASE_URL = "http://dev.api.bladeandbrawn.com";
const PRINTFUL_WEBHOOK_URL = `${BASE_URL}/webhook/printful`;
const WEBFLOW_WEBHOOK_URL = `${BASE_URL}/webhook/webflow`;
+8 -3
View File
@@ -100,11 +100,16 @@ export const app = new Elysia()
}
})
.onAfterHandle(({ request, set }) => {
.onAfterResponse(({ request, status, path }) => {
const skip: Record<string, string[]> = {
"/products/sync/": ["GET"]
};
if (env.NODE_ENV === "development" && skip[path]?.includes(request.method)) return;
log.info({
method: request.method,
path: new URL(request.url).pathname,
status: set.status ?? 200
path,
status
}, "request");
})