Filter out system areas
This commit is contained in:
parent
8479091d33
commit
e555a28160
|
@ -9,6 +9,7 @@ const stringFormat = require('./string_format.js');
|
|||
const FileEntry = require('./file_entry.js');
|
||||
const FileBaseFilters = require('./file_base_filter.js');
|
||||
const Errors = require('./enig_error.js').Errors;
|
||||
const { getAvailableFileAreaTags } = require('./file_base_area.js');
|
||||
|
||||
// deps
|
||||
const _ = require('lodash');
|
||||
|
@ -166,8 +167,13 @@ exports.getModule = class NewScanModule extends MenuModule {
|
|||
|
||||
newScanFileBase(cb) {
|
||||
// :TODO: add in steps
|
||||
const filterCriteria = {
|
||||
newerThanFileId : FileBaseFilters.getFileBaseLastViewedFileIdByUser(this.client.user),
|
||||
areaTag : getAvailableFileAreaTags(this.client),
|
||||
};
|
||||
|
||||
FileEntry.findFiles(
|
||||
{ newerThanFileId : FileBaseFilters.getFileBaseLastViewedFileIdByUser(this.client.user) },
|
||||
filterCriteria,
|
||||
(err, fileIds) => {
|
||||
if(err || 0 === fileIds.length) {
|
||||
return cb(err ? err : Errors.DoesNotExist('No more new files'));
|
||||
|
|
Loading…
Reference in New Issue