More cleanup
This commit is contained in:
@@ -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`;
|
||||
|
||||
@@ -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");
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user