Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Commit

Permalink
Merge branch 'release/0.3.0-rc.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
phillmac committed Jun 29, 2019
2 parents ca40e04 + dd31f59 commit a7f536b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "orbit-db-http-api",
"version": "0.3.0-rc.2",
"version": "0.3.0-rc.3",
"description": "An HTTP API Server for the OrbitDB distributed peer-to-peer database",
"main": "src/cli.js",
"keywords": [
Expand Down
4 changes: 3 additions & 1 deletion src/lib/orbitdb-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ class OrbitdbAPI {
method: ['POST', 'PUT'],
path: '/db/{dbname}/inc',
handler: dbMiddleware( async (db, request, _h) => {
return {hash: await db.inc(parseInt(request.payload.val || 1))};
let incval
incval = parseInt(request.payload ? request.payload.val || 1 : 1);
return {hash: await db.inc(incval)};
})
},
{
Expand Down

0 comments on commit a7f536b

Please sign in to comment.