Skip to content

Commit

Permalink
fixup! feat(be): request logger middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
krystxf committed Dec 7, 2024
1 parent 347f554 commit 636898a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions apps/backend/src/middleware/request-logger-middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@ export class RequestLoggerMiddleware implements NestMiddleware {
? responseBody
: JSON.stringify(responseBody);

const ignoreResponse = [
"/v1/stop/all",
"/v1/platform/",
"/status",
].some((item) => path.startsWith(item));
const ignoreResponse = ["/v1/stop/all", "/v1/platform/"].some(
(item) => path.startsWith(item),
);

if (path.startsWith("/status")) {
return;
}

try {
// Log the request details to the database
Expand Down

0 comments on commit 636898a

Please sign in to comment.