1
0
Fork 0
mirror of synced 2024-06-27 18:40:42 +12:00

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 64cfc02fa2
commit ed2672fca3

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