Browse Source

Quick change to make sure as long as internal views are denoted in the db constant they'll be handled.

gh-pages
mike12345567 6 years ago
parent
commit
ed2672fca3
  1. 4
      packages/server/src/api/controllers/deploy/quota.js

4
packages/server/src/api/controllers/deploy/quota.js

@ -6,8 +6,6 @@ const {
ViewNames,
} = require("../../../db/utils")
const EXCLUDED_VIEWS = [ViewNames.USERS, ViewNames.LINK, ViewNames.ROUTING]
exports.getAppQuota = async function(appId) {
const db = new PouchDB(appId)
@ -28,7 +26,7 @@ exports.getAppQuota = async function(appId) {
let views = 0
for (let viewName of Object.keys(designDoc.views)) {
if (EXCLUDED_VIEWS.indexOf(viewName) === -1) {
if (Object.values(ViewNames).indexOf(viewName) === -1) {
views++
}
}

Loading…
Cancel
Save