Skip to content

Commit

Permalink
Update payload used by <EditCustomFieldsSettings>
Browse files Browse the repository at this point in the history
Add `entityType` to payload for `PUT /custom-fields`
  • Loading branch information
alb3rtino committed Dec 5, 2023
1 parent a0da657 commit 88e359d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Show the username in the "last updated" accordion in the Note editing pane. Fixes STSMACOM-748.
* Added `indexRef` and `inputRef` props to `<SearchAndSort>`. Refs STSMACOM-788.
* Extend NotesAccordion and NotesSmartAccodion components to accept a prop hideNewButton. Refs STSMACOM-789.
* `<EditCustomFieldsSettings>` now passes the `entityType` when making PUT requests to `/custom-fields`. Refs FCFIELDS-44.

## [9.0.0](https://github.com/folio-org/stripes-smart-components/tree/v9.0.0) (2023-10-11)
[Full Changelog](https://github.com/folio-org/stripes-smart-components/compare/v8.0.0...v9.0.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ const EditCustomFieldsSettings = ({
const updateCustomFields = data => {
return makeOkapiRequest('custom-fields')({
method: 'PUT',
body: JSON.stringify({ customFields: data }),
body: JSON.stringify({ customFields: data, entityType }),
});
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ describe('EditCustomFieldsSettings', () => {
},
},
});
expect(body.entityType).to.equal('user');
});
});
});

0 comments on commit 88e359d

Please sign in to comment.