mirror of
https://github.com/zadam/trilium.git
synced 2025-11-14 09:15:50 +01:00
support for cssClass label on note
This commit is contained in:
@@ -10,6 +10,10 @@ async function setEntityConstructor(constructor) {
|
||||
}
|
||||
|
||||
async function getEntityFromName(entityName, entityId) {
|
||||
if (!entityName || !entityId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const constructor = entityConstructor.getEntityFromTableName(entityName);
|
||||
|
||||
return await getEntity(`SELECT * FROM ${constructor.tableName} WHERE ${constructor.primaryKeyName} = ?`, [entityId]);
|
||||
|
||||
Reference in New Issue
Block a user