Browse Source

Updating for review comments.

gh-pages
mike12345567 6 years ago
parent
commit
aeed753786
  1. 6
      packages/server/src/api/controllers/application.js

6
packages/server/src/api/controllers/application.js

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

Loading…
Cancel
Save