[ci] format
This commit is contained in:
parent
b7194103e3
commit
8a721173b3
1 changed files with 16 additions and 14 deletions
|
@ -41,16 +41,18 @@ export class NodeApp extends App {
|
|||
return super.match(req instanceof Request ? req : createRequestFromNodeRequest(req), opts);
|
||||
}
|
||||
render(req: NodeIncomingMessage | Request, routeData?: RouteData) {
|
||||
if (typeof (req.body) === 'string' && req.body.length > 0) {
|
||||
if (typeof req.body === 'string' && req.body.length > 0) {
|
||||
return super.render(
|
||||
req instanceof Request ? req : createRequestFromNodeRequest(req, Buffer.from(req.body)),
|
||||
routeData
|
||||
);
|
||||
}
|
||||
|
||||
if ((typeof (req.body) === 'object') && (Object.keys(req.body).length > 0)) {
|
||||
if (typeof req.body === 'object' && Object.keys(req.body).length > 0) {
|
||||
return super.render(
|
||||
req instanceof Request ? req : createRequestFromNodeRequest(req, Buffer.from(JSON.stringify(req.body))),
|
||||
req instanceof Request
|
||||
? req
|
||||
: createRequestFromNodeRequest(req, Buffer.from(JSON.stringify(req.body))),
|
||||
routeData
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue