#19, added tags, and tags filtering

This commit is contained in:
2026-02-13 22:02:31 +02:00
parent 5c934e0ad2
commit b11e763fd9
11 changed files with 90 additions and 23 deletions
+7
View File
@@ -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;
}
}
/**