mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-05 08:40:11 +00:00
Addressed test failures from users API changes
This commit is contained in:
parent
46e6e239dc
commit
c8be6ee8a6
5 changed files with 9 additions and 5 deletions
app/Exceptions
|
@ -39,6 +39,11 @@ class NotifyException extends Exception implements Responsable
|
|||
{
|
||||
$message = $this->getMessage();
|
||||
|
||||
// Front-end JSON handling. API-side handling managed via handler.
|
||||
if ($request->wantsJson()) {
|
||||
return response()->json(['error' => $message], 403);
|
||||
}
|
||||
|
||||
if (!empty($message)) {
|
||||
session()->flash('error', $message);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue