More cleanup
This commit is contained in:
@@ -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