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

Commit 2dd6ff1

Browse files
committed
cleanup DELETE /db/:dbname, fix missing async
1 parent 7344699 commit 2dd6ff1

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/lib/db-manager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class DBManager {
2727
}
2828
};
2929

30-
this.db_list_remove = (dbn) => {
30+
this.db_list_remove = async (dbn) => {
3131
db = find_db(dbn)
3232
if (db) {
3333
await db.disconnect()

src/lib/orbitdb-api.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,7 @@ class OrbitdbAPI extends Express {
4242
});
4343

4444
this.delete('/db/:dbname', asyncMiddleware( async (req, res, next) => {
45-
let db
46-
db = await dbm.get(req.params.dbname)
47-
48-
await db.drop()
49-
dbm.db_list_remove(req.params.dbname)
45+
await dbm.db_list_remove(req.params.dbname)
5046
return res.json('')
5147
}))
5248

0 commit comments

Comments
 (0)