419 error control

This commit is contained in:
Burak Civan 2022-12-21 16:40:31 +03:00
parent 53292a463e
commit 2cf73de59f

View File

@ -493,6 +493,11 @@ export default class Form {
// Form fields check validation issue
onFail(error) {
if (error.request.status == 419) {
window.location.href = '';
return;
}
if (typeof this.errors != "undefined") {
this.errors.record(error.response.data.errors);
}