Skip to content

Commit

Permalink
Revert "feat(vc-api): log req body (#188)"
Browse files Browse the repository at this point in the history
This reverts commit 244eec7.
  • Loading branch information
jrhender committed Oct 13, 2023
1 parent 244eec7 commit 635ef06
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 38 deletions.
30 changes: 0 additions & 30 deletions apps/vc-api/src/logging.config.ts

This file was deleted.

2 changes: 0 additions & 2 deletions apps/vc-api/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@ import { resolve as resolvePath } from 'path';
import { SwaggerModule } from '@nestjs/swagger';
import { SeederService } from './seeder/seeder.service';
import * as process from 'process';
import * as express from 'express';

async function bootstrap() {
const app = await setupApp();
app.use(express.json());
SwaggerModule.setup('api', app, setupSwaggerDocument(app));
await app.listen(process.env.PORT);

Expand Down
7 changes: 1 addition & 6 deletions apps/vc-api/src/morgan.middleware.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
import { Injectable, NestMiddleware } from '@nestjs/common';
import * as morgan from 'morgan';
import { morganFormat } from './logging.config';

@Injectable()
export class MorganMiddleware implements NestMiddleware {
use(req: any, res: any, next: () => void) {
if (req.baseUrl !== '' && req.baseUrl !== '/') {
morgan(morganFormat)(req, res, next);
} else {
next();
}
morgan('combined')(req, res, next);
}
}

0 comments on commit 635ef06

Please sign in to comment.