mirror of https://gitee.com/bigwinds/arangodb
Foxx: Fix error for `body()` when body is empty
This commit is contained in:
parent
38e4853a99
commit
f62ce6cd7f
|
@ -61,7 +61,8 @@ BaseMiddleware = function () {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
body: function () {
|
||||
return JSON.parse(this.requestBody);
|
||||
var requestBody = this.requestBody || '{}';
|
||||
return JSON.parse(requestBody);
|
||||
},
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Reference in New Issue