Skip to content

Commit

Permalink
Core Data: Pass the 'options' argument to data action shortcuts (#57383)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka committed Jan 1, 2024
1 parent a87f24e commit 06b5fa5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/core-data/src/index.js
Expand Up @@ -44,10 +44,10 @@ const entityResolvers = rootEntitiesConfig.reduce( ( result, entity ) => {

const entityActions = rootEntitiesConfig.reduce( ( result, entity ) => {
const { kind, name } = entity;
result[ getMethodName( kind, name, 'save' ) ] = ( key ) =>
actions.saveEntityRecord( kind, name, key );
result[ getMethodName( kind, name, 'delete' ) ] = ( key, query ) =>
actions.deleteEntityRecord( kind, name, key, query );
result[ getMethodName( kind, name, 'save' ) ] = ( record, options ) =>
actions.saveEntityRecord( kind, name, record, options );
result[ getMethodName( kind, name, 'delete' ) ] = ( key, query, options ) =>
actions.deleteEntityRecord( kind, name, key, query, options );
return result;
}, {} );

Expand Down

0 comments on commit 06b5fa5

Please sign in to comment.