removed dataKey where it's not necessary anymore (use of CLS instead)

This commit is contained in:
azivner
2018-03-31 08:53:52 -04:00
parent 5d203b2278
commit 05676f3459
12 changed files with 78 additions and 105 deletions

View File

@@ -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;