Quick change to make sure as long as internal views are denoted in the db constant they'll be handled.
This commit is contained in:
parent
0345323a3d
commit
794d7cc021
|
@ -6,8 +6,6 @@ const {
|
||||||
ViewNames,
|
ViewNames,
|
||||||
} = require("../../../db/utils")
|
} = require("../../../db/utils")
|
||||||
|
|
||||||
const EXCLUDED_VIEWS = [ViewNames.USERS, ViewNames.LINK, ViewNames.ROUTING]
|
|
||||||
|
|
||||||
exports.getAppQuota = async function(appId) {
|
exports.getAppQuota = async function(appId) {
|
||||||
const db = new PouchDB(appId)
|
const db = new PouchDB(appId)
|
||||||
|
|
||||||
|
@ -28,7 +26,7 @@ exports.getAppQuota = async function(appId) {
|
||||||
|
|
||||||
let views = 0
|
let views = 0
|
||||||
for (let viewName of Object.keys(designDoc.views)) {
|
for (let viewName of Object.keys(designDoc.views)) {
|
||||||
if (EXCLUDED_VIEWS.indexOf(viewName) === -1) {
|
if (Object.values(ViewNames).indexOf(viewName) === -1) {
|
||||||
views++
|
views++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue