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

Commit d549b6a

Browse files
committed
Deafult to inc by +1 if val is missing
1 parent 11578ca commit d549b6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/orbitdb-api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class OrbitdbAPI extends Express {
7777
var db_inc = asyncMiddleware( async (req, res, next) => {
7878
let db, hash
7979
db = await dbm.get(req.params.dbname)
80-
hash = await db.inc(parseInt(req.body.val))
80+
hash = await db.inc(parseInt(req.body.val || 1))
8181
return res.json(hash)
8282
});
8383

0 commit comments

Comments
 (0)