in src/lib/store/modules/entity.store.js [13:37]
async fetchEntities({commit}, {clientId, ownerId}) {
const params = {clientId, ownerId};
const queryString = JSON.stringify(params);
const entities = await custosService.entities.getEntities(params);
const entityIds = entities.map(({id, type, name, description, parent_id, owner_id, created_at, updated_at, shared_count, full_text, binary_data}) => {
commit('SET_ENTITY', {
clientId,
entityId: id,
type,
name,
description,
parentId: parent_id,
ownerId: owner_id,
createdAt: new Date(parseInt(created_at)).toLocaleString(),
updatedAt: new Date(parseInt(updated_at)).toLocaleString(),
sharedCount: shared_count,
fullText: full_text,
binaryData: binary_data
});
return id;
});
commit('SET_ENTITY_LIST', {queryString, entityIds});
},