added lowercase text onchange
This commit is contained in:
1 parent
dacf729bca
commit
3a99250508
5 files changed
+19
-11
No files matched your search
@@ -12,8 +12,7 @@ const initialState = {
|
||||
|
||||
export const register = createAsyncThunk("auth/register", async (form, thunkApi) => {
|
||||
try {
|
||||
const newForm = {...form, email: form.email.toLowerCase()}
|
||||
const res = await networkService.registerUser(newForm);
|
||||
const res = await networkService.registerUser(form);
|
||||
return res.data;
|
||||
} catch (error) {
|
||||
if (error.response.data) {
|
||||
@@ -29,8 +28,7 @@ export const register = createAsyncThunk("auth/register", async (form, thunkApi)
|
||||
|
||||
export const login = createAsyncThunk("auth/login", async (form, thunkApi) => {
|
||||
try {
|
||||
const newForm = {...form, email: form.email.toLowerCase()}
|
||||
const res = await networkService.loginUser(newForm);
|
||||
const res = await networkService.loginUser(form);
|
||||
return res.data;
|
||||
} catch (error) {
|
||||
if (error.response && error.response.data) {
|
||||
|
||||
Reference in new issue
Block a user