|
|
@ -26,7 +26,11 @@ const GatePanel: FC = () => { |
|
|
|
setIsSubmitting(true); |
|
|
|
setIsSubmitting(true); |
|
|
|
|
|
|
|
|
|
|
|
api |
|
|
|
api |
|
|
|
.post('/auth/login', { username, password }) |
|
|
|
.post( |
|
|
|
|
|
|
|
'/auth/login', |
|
|
|
|
|
|
|
{ username, password }, |
|
|
|
|
|
|
|
{ withCredentials: true }, |
|
|
|
|
|
|
|
) |
|
|
|
.then(() => { |
|
|
|
.then(() => { |
|
|
|
router.push('/'); |
|
|
|
router.push('/'); |
|
|
|
}) |
|
|
|
}) |
|
|
@ -34,6 +38,7 @@ const GatePanel: FC = () => { |
|
|
|
const emsg = handleAPIError(error, { |
|
|
|
const emsg = handleAPIError(error, { |
|
|
|
onResponseErrorAppend: () => ({ |
|
|
|
onResponseErrorAppend: () => ({ |
|
|
|
children: `Credentials mismatched.`, |
|
|
|
children: `Credentials mismatched.`, |
|
|
|
|
|
|
|
type: 'warning', |
|
|
|
}), |
|
|
|
}), |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|