mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 22:33:44 +02:00
Log the error output for API
This commit is contained in:
@@ -36,7 +36,7 @@ class APILogService
|
||||
//
|
||||
}
|
||||
|
||||
public static function log(Request $request, $authorized = false)
|
||||
public static function log(Request $request, $error = null, $authorized = false)
|
||||
{
|
||||
if ($request->bearerToken() && !empty($request->bearerToken())) {
|
||||
list($public, $hashed) = explode('.', $request->bearerToken());
|
||||
@@ -47,6 +47,7 @@ class APILogService
|
||||
try {
|
||||
$log = APILog::create([
|
||||
'authorized' => $authorized,
|
||||
'error' => $error,
|
||||
'key' => $public,
|
||||
'method' => $request->method(),
|
||||
'route' => $request->fullUrl(),
|
||||
|
||||
Reference in New Issue
Block a user