1
0
Fork 0
mirror of synced 2024-06-30 03:50:37 +12:00

Updating for review comments.

This commit is contained in:
mike12345567 2020-10-29 11:48:01 +00:00
parent 2180a1639d
commit aeed753786

View file

@ -49,11 +49,7 @@ async function createInstance(template) {
exports.fetch = async function(ctx) { exports.fetch = async function(ctx) {
let allDbs = await CouchDB.allDbs() let allDbs = await CouchDB.allDbs()
const appDbNames = allDbs.filter(dbName => dbName.startsWith(APP_PREFIX)) const appDbNames = allDbs.filter(dbName => dbName.startsWith(APP_PREFIX))
const apps = [] const apps = appDbNames.map(db => new CouchDB(db).get(db))
for (let dbName of appDbNames) {
const db = new CouchDB(dbName)
apps.push(db.get(dbName))
}
if (apps.length === 0) { if (apps.length === 0) {
ctx.body = [] ctx.body = []
} else { } else {