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:
mike12345567 2021-02-22 16:13:11 +00:00
parent 0345323a3d
commit 794d7cc021
1 changed files with 1 additions and 3 deletions

View File

@ -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++
}
}