mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-10 03:23:04 +00:00
Combine API props, update tests for redux hooks
This commit is contained in:
@@ -107,17 +107,4 @@ AddUser.propTypes = {
|
||||
}),
|
||||
};
|
||||
|
||||
const withUserAPI = withProps((props) => ({
|
||||
addUsers: (usernames, admin) =>
|
||||
jhapiRequest("/users", "POST", { usernames, admin }),
|
||||
failRegexEvent: () =>
|
||||
alert(
|
||||
"Removed " +
|
||||
JSON.stringify(removed_users) +
|
||||
" for either containing special characters or being too short."
|
||||
),
|
||||
refreshUserData: () =>
|
||||
jhapiRequest("/users", "GET").then((data) => data.json()),
|
||||
}));
|
||||
|
||||
export default compose(withUserAPI)(AddUser);
|
||||
export default AddUser;
|
||||
|
Reference in New Issue
Block a user