mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-11 20:13:02 +00:00
Combine API props, update tests for redux hooks
This commit is contained in:
@@ -81,16 +81,4 @@ CreateGroup.propTypes = {
|
||||
}),
|
||||
};
|
||||
|
||||
const withGroupsAPI = withProps((props) => ({
|
||||
createGroup: (groupName) => jhapiRequest("/groups/" + groupName, "POST"),
|
||||
failRegexEvent: () =>
|
||||
alert(
|
||||
"Removed " +
|
||||
JSON.stringify(removed_users) +
|
||||
" for either containing special characters or being too short."
|
||||
),
|
||||
refreshGroupsData: () =>
|
||||
jhapiRequest("/groups", "GET").then((data) => data.json()),
|
||||
}));
|
||||
|
||||
export default compose(withGroupsAPI)(CreateGroup);
|
||||
export default CreateGroup;
|
||||
|
Reference in New Issue
Block a user