mirror of
https://github.com/zadam/trilium.git
synced 2025-11-11 15:55:52 +01:00
removed dataKey where it's not necessary anymore (use of CLS instead)
This commit is contained in:
@@ -7,17 +7,9 @@ const Label = require('../entities/label');
|
||||
const sync_table = require('../services/sync_table');
|
||||
|
||||
class Repository {
|
||||
constructor(dataKey) {
|
||||
this.dataKey = protected_session.getDataKey(dataKey);
|
||||
}
|
||||
|
||||
async getEntities(query, params = []) {
|
||||
const rows = await sql.getRows(query, params);
|
||||
|
||||
for (const row of rows) {
|
||||
row.dataKey = this.dataKey;
|
||||
}
|
||||
|
||||
return rows.map(row => this.createEntityFromRow(row));
|
||||
}
|
||||
|
||||
@@ -28,8 +20,6 @@ class Repository {
|
||||
return null;
|
||||
}
|
||||
|
||||
row.dataKey = this.dataKey;
|
||||
|
||||
return this.createEntityFromRow(row);
|
||||
}
|
||||
|
||||
@@ -66,7 +56,6 @@ class Repository {
|
||||
|
||||
const clone = Object.assign({}, entity);
|
||||
|
||||
delete clone.dataKey;
|
||||
delete clone.jsonContent;
|
||||
delete clone.repository;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user