#19, added tags, and tags filtering
This commit is contained in:
@@ -9,6 +9,8 @@ const execFile = util.promisify(npExecFile);
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
import Utils from "../Utils.js";
|
||||
|
||||
const collection = 'assets';
|
||||
|
||||
/**
|
||||
@@ -144,6 +146,11 @@ class GameObjectsManager{
|
||||
project: { name:1, id:1, type:1, asset:1}
|
||||
});
|
||||
}
|
||||
|
||||
this.getTags = async function(q){
|
||||
let objects = await db.distinct(collection, 'tags', q ? {tags: {$regex: Utils.escapeRegExp(q), $options: 'i'}} : {});
|
||||
return objects;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user