Finish first round of User/Node API additions
Will still need some tweaking and improvements to allow everything to be used.
This commit is contained in:
parent
d21f70c04b
commit
15289b76a7
10 changed files with 220 additions and 68 deletions
|
@ -11,6 +11,7 @@ namespace Pterodactyl\Exceptions;
|
|||
|
||||
use Log;
|
||||
use Throwable;
|
||||
use Illuminate\Http\Response;
|
||||
use Prologue\Alerts\AlertsMessageBag;
|
||||
|
||||
class DisplayException extends PterodactylException
|
||||
|
@ -65,7 +66,7 @@ class DisplayException extends PterodactylException
|
|||
if ($request->expectsJson()) {
|
||||
return response()->json(Handler::convertToArray($this, [
|
||||
'detail' => $this->getMessage(),
|
||||
]), method_exists($this, 'getStatusCode') ? $this->getStatusCode() : 500);
|
||||
]), method_exists($this, 'getStatusCode') ? $this->getStatusCode() : Response::HTTP_INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
app()->make(AlertsMessageBag::class)->danger($this->getMessage())->flash();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue