Invalidate sessions if DB cannot be set

This commit is contained in:
David Bomba 2024-07-01 08:40:57 +10:00
parent e0a3126e88
commit 52e4931b68

View File

@ -56,7 +56,8 @@ class SetDomainNameDb
return response()->json($error, 403);
} else {
MultiDB::setDb('db-ninja-01');
nlog('I could not set the DB - defaulting to DB1');
nlog('SetDomainNameDb:: I could not set the DB - defaulting to DB1');
$request->session()->invalidate();
//abort(400, 'Domain not found');
}
}
@ -73,7 +74,8 @@ class SetDomainNameDb
return response()->json($error, 403);
} else {
MultiDB::setDb('db-ninja-01');
nlog('I could not set the DB - defaulting to DB1');
nlog('SetDomainNameDb:: I could not set the DB - defaulting to DB1');
$request->session()->invalidate();
}
}
}