Skip to content

Commit

Permalink
feat(app): add xml parser to req
Browse files Browse the repository at this point in the history
  • Loading branch information
maslow committed Sep 16, 2022
1 parent 1d215a4 commit 198027c
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 2 deletions.
61 changes: 60 additions & 1 deletion packages/app-service/package-lock.json

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

2 changes: 2 additions & 0 deletions packages/app-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"dotenv": "^8.2.0",
"ejs": "^3.1.6",
"express": "^4.17.1",
"express-xml-bodyparser": "^0.3.0",
"fs-extra": "^9.1.0",
"jsonwebtoken": "^8.5.1",
"lodash": "^4.17.21",
Expand All @@ -55,6 +56,7 @@
"@types/dotenv": "^8.2.0",
"@types/ejs": "^3.0.7",
"@types/express": "^4.17.11",
"@types/express-xml-bodyparser": "^0.3.2",
"@types/fs-extra": "^9.0.8",
"@types/jsonwebtoken": "^8.5.1",
"@types/lodash": "^4.14.171",
Expand Down
5 changes: 4 additions & 1 deletion packages/app-service/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import { generateUUID } from './support/utils'
import { WebSocketAgent } from './support/ws'
import { DatabaseAgent } from './db'
import { SchedulerInstance } from './support/scheduler'

// const xmlparser = require('express-xml-bodyparser')
import * as xmlparser from 'express-xml-bodyparser'

/**
* Just for generating declaration type files for `@/cloud-sdk` which used in cloud function
Expand All @@ -33,6 +34,8 @@ app.use(express.raw({
limit: Config.REQUEST_LIMIT_SIZE,
}) as any)

app.use(xmlparser());


process.on('unhandledRejection', (reason, promise) => {
logger.error(`Caught unhandledRejection:`, reason, promise)
Expand Down

0 comments on commit 198027c

Please sign in to comment.