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

Commit da11af4

Browse files
authored
Merge GET /db/:dbname/all route (#5)
* Add route GET /db/:dbname/all
1 parent 12a8d8d commit da11af4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/lib/orbitdb-api.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,12 @@ class OrbitdbAPI extends Express {
159159
return res.json(db.value)
160160
}));
161161

162+
this.get('/db/:dbname/all', asyncMiddleware( async (req, res, next) => {
163+
let db
164+
db = await dbm.get(req.params.dbname)
165+
return res.json(db.all())
166+
}));
167+
162168
this.get('/db/:dbname/:item', asyncMiddleware( async (req, res, next) => {
163169
let result, contents
164170
contents = await getraw(req,res, next)

0 commit comments

Comments
 (0)