mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-07-12 22:23:01 +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) => {
|
handleSubmit: async (values: FormValues, formikBag) => {
|
||||||
const emails = values.emails.trim().split(WHITESPACE_SPLIT);
|
const emails = values.emails.trim().split(WHITESPACE_SPLIT);
|
||||||
await addUsers("/api/manage/admin/users", { arg: emails }).then((res) => {
|
formikBag.setSubmitting(true);
|
||||||
if (res.ok) {
|
await addUsers("/api/manage/admin/users", { arg: emails })
|
||||||
formikBag.props.onSuccess();
|
.then((res) => {
|
||||||
} else {
|
if (res.ok) {
|
||||||
formikBag.props.onFailure(res);
|
formikBag.props.onSuccess();
|
||||||
}
|
} else {
|
||||||
});
|
formikBag.props.onFailure(res);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
formikBag.setSubmitting(false);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
})(AddUserFormRenderer);
|
})(AddUserFormRenderer);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user