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

Commit 327ab6c

Browse files
committed
Fix bug with docstore put not working properly
1 parent 1ef784d commit 327ab6c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

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

src/lib/orbitdb-api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ class OrbitdbAPI extends Express {
6262
var db_put = asyncMiddleware( async (req, res, next) => {
6363
let db, hash
6464
db = await dbm.get(req.params.dbname)
65+
params = req.body;
6566

6667
if (db.type == 'keyvalue') {
6768
let params, key, value
68-
params = req.body;
6969
if (!params['key']) {
7070
[key,value] = [Object.keys(params)[0], Object.values(params)[0]]
7171
} else {

0 commit comments

Comments
 (0)