refactor: bot email
This commit is contained in:
@@ -6,6 +6,7 @@ import Modal from '../../../common/component/Modal';
|
|||||||
import Button from '../../../common/component/styled/Button';
|
import Button from '../../../common/component/styled/Button';
|
||||||
import Input from '../../../common/component/styled/Input';
|
import Input from '../../../common/component/styled/Input';
|
||||||
import StyledModal from '../../../common/component/styled/Modal';
|
import StyledModal from '../../../common/component/styled/Modal';
|
||||||
|
import { BASE_ORIGIN } from '../../../app/config';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
closeModal: () => void
|
closeModal: () => void
|
||||||
@@ -35,11 +36,12 @@ const CreateModal = ({ closeModal }: Props) => {
|
|||||||
formDataObj[key] = value;
|
formDataObj[key] = value;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
const hostname = new URL(BASE_ORIGIN).hostname;
|
||||||
createUser({
|
createUser({
|
||||||
is_bot: true,
|
is_bot: true,
|
||||||
is_admin: false,
|
is_admin: false,
|
||||||
gender: 1,
|
gender: 1,
|
||||||
email: `bot_${new Date().getTime()}@voce.chat`,
|
email: `bot_${new Date().getTime()}@${hostname}`,
|
||||||
password: "",
|
password: "",
|
||||||
...formDataObj
|
...formDataObj
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user