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

Commit 60b7d46

Browse files
committed
Fix "Identifier 'contents' already been declared"
1 parent 6d5235d commit 60b7d46

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/lib/orbitdb-api.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,13 @@ class OrbitdbAPI extends Express {
131131
return res.json(await rawiterator(req,res,next))}));
132132

133133
var getraw = async (req, res, next) => {
134-
let db, contents
134+
let db
135135
db = await dbm.get(req.params.dbname)
136-
contents = await db.get(req.params.item)
137-
return contents
136+
return await db.get(req.params.item)
138137
}
139138

140139
this.get('/db/:dbname/raw/:item', asyncMiddleware( async (req, res, next) => {
141-
let contents,
140+
let contents
142141
contents = await getraw(req, res, next)
143142
return res.json(contents)
144143
}));

0 commit comments

Comments
 (0)