Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/fix-caip10' into legacy-request-…
Browse files Browse the repository at this point in the history
…translation
  • Loading branch information
samteb committed Feb 27, 2024
2 parents 269823b + 6716e05 commit 77c3433
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 18 deletions.
17 changes: 1 addition & 16 deletions apps/policy-engine/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { INestApplication, Logger, ValidationPipe } from '@nestjs/common'
import { ConfigService } from '@nestjs/config'
import { NestFactory } from '@nestjs/core'
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger'
import { json, urlencoded } from 'express'
import { lastValueFrom, map, of, switchMap } from 'rxjs'
import { AppModule } from './app/app.module'

Expand Down Expand Up @@ -38,21 +37,9 @@ const withGlobalPipes = (app: INestApplication): INestApplication => {
return app
}

const withJsonBodyParser = (app: INestApplication): INestApplication => {
app.use(json({ limit: '50mb' }))

return app
}

const withUrlEncoded = (app: INestApplication): INestApplication => {
app.use(urlencoded({ extended: true, limit: '50mb' }))

return app
}

async function bootstrap() {
const logger = new Logger('AuthorizationNodeBootstrap')
const application = await NestFactory.create(AppModule)
const application = await NestFactory.create(AppModule, { bodyParser: true })
const configService = application.get(ConfigService)
const port = configService.get('PORT')

Expand All @@ -64,8 +51,6 @@ async function bootstrap() {
of(application).pipe(
map(withSwagger),
map(withGlobalPipes),
map(withJsonBodyParser),
map(withUrlEncoded),
switchMap((app) => app.listen(port))
)
)
Expand Down
1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@
"class-validator": "^0.14.1",
"clsx": "^1.2.1",
"date-fns": "^3.3.1",
"express": "^4.18.2",
"handlebars": "^4.7.8",
"jose": "^5.2.1",
"lodash": "^4.17.21",
Expand Down

0 comments on commit 77c3433

Please sign in to comment.