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

Commit a7f536b

Browse files
committed
Merge branch 'release/0.3.0-rc.3'
2 parents ca40e04 + dd31f59 commit a7f536b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "orbit-db-http-api",
3-
"version": "0.3.0-rc.2",
3+
"version": "0.3.0-rc.3",
44
"description": "An HTTP API Server for the OrbitDB distributed peer-to-peer database",
55
"main": "src/cli.js",
66
"keywords": [

Diff for: src/lib/orbitdb-api.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,9 @@ class OrbitdbAPI {
177177
method: ['POST', 'PUT'],
178178
path: '/db/{dbname}/inc',
179179
handler: dbMiddleware( async (db, request, _h) => {
180-
return {hash: await db.inc(parseInt(request.payload.val || 1))};
180+
let incval
181+
incval = parseInt(request.payload ? request.payload.val || 1 : 1);
182+
return {hash: await db.inc(incval)};
181183
})
182184
},
183185
{

0 commit comments

Comments
 (0)