fix: updated auth to resolve ajax issues

This commit is contained in:
Kwesi Banson Jnr
2026-07-23 22:01:51 +00:00
parent 08ded57875
commit b6892c54be
3 changed files with 7 additions and 32 deletions

View File

@@ -243,6 +243,9 @@
}
},
error: function(xhr) {
if (xhr.status === 401) {
window.location.href = base_url + '/login';
}
// Handle Laravel Validation Errors (Status 422)
if (xhr.status === 422) {
let errors = xhr.responseJSON.errors;