+27
-0
lines changedFilter options
+27
-0
lines changed Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
1
+
import schema from "app/schema";
2
+
import {getModelByType} from "common/utils/modelUtils";
3
+
4
+
export function updateEditingEntitiesState(state, updatedEditingEntities) {
5
+
return {
6
+
...state,
7
+
editingEntities : updatedEditingEntities,
8
+
};
9
+
}
10
+
11
+
export function updateEntitiesState(state, updatedEntities) {
12
+
return {
13
+
...state,
14
+
entities : updatedEntities,
15
+
};
16
+
}
17
+
18
+
export function readEntityData(entities, itemType, itemID) {
19
+
const readSession = schema.from(entities);
20
+
21
+
// Look up the model instance for the requested item
22
+
const model = getModelByType(readSession, itemType, itemID);
23
+
const data = model.toJSON();
24
+
25
+
return data;
26
+
}
27
+
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4