1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-18 04:21:12 +02:00

put limit on file mode creations in free plan

This commit is contained in:
Kushagra Gour
2019-03-08 16:36:49 +05:30
parent cd486fc3ba
commit 02b9e56562
2 changed files with 18 additions and 2 deletions

View File

@@ -253,5 +253,13 @@ export const itemService = {
log(`Item ${itemId} unset for user`, arg);
})
.catch(error => log(error));
},
async getCountOfFileModeItems() {
const items = await this.getAllItems();
return items.reduce((count, item) => {
if (item.files) return ++count;
return count;
}, 0);
}
};