We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b0ea6b6 commit fdd7e95Copy full SHA for fdd7e95
1 file changed
src/core/resources/entity/api.ts
@@ -6,12 +6,9 @@ export async function pushEntities(
6
entities: Entity[]
7
): Promise<SyncEntitiesResponse> {
8
const appClient = getAppClient();
9
- const schemaSyncPayload = entities.reduce((acc, current) => {
10
- return {
11
- ...acc,
12
- [current.name]: current,
13
- };
14
- }, {});
+ const schemaSyncPayload = Object.fromEntries(
+ entities.map((entity) => [entity.name, entity])
+ );
15
16
const response = await appClient.put("entities-schemas/sync-all", {
17
json: {
0 commit comments