mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-07-12 14:12:53 +02:00
Small tweak to user invite flow
This commit is contained in:
@ -79,13 +79,18 @@ const AddUserForm = withFormik<FormProps, FormValues>({
|
||||
},
|
||||
handleSubmit: async (values: FormValues, formikBag) => {
|
||||
const emails = values.emails.trim().split(WHITESPACE_SPLIT);
|
||||
await addUsers("/api/manage/admin/users", { arg: emails }).then((res) => {
|
||||
if (res.ok) {
|
||||
formikBag.props.onSuccess();
|
||||
} else {
|
||||
formikBag.props.onFailure(res);
|
||||
}
|
||||
});
|
||||
formikBag.setSubmitting(true);
|
||||
await addUsers("/api/manage/admin/users", { arg: emails })
|
||||
.then((res) => {
|
||||
if (res.ok) {
|
||||
formikBag.props.onSuccess();
|
||||
} else {
|
||||
formikBag.props.onFailure(res);
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
formikBag.setSubmitting(false);
|
||||
});
|
||||
},
|
||||
})(AddUserFormRenderer);
|
||||
|
||||
|
Reference in New Issue
Block a user