diff --git a/app/Http/Controllers/StaticController.php b/app/Http/Controllers/StaticController.php new file mode 100644 index 000000000000..1cb4ccf1ff00 --- /dev/null +++ b/app/Http/Controllers/StaticController.php @@ -0,0 +1,36 @@ +user()->getCompany()->getLocale()); + + return response()->json($response, 200, ['Content-type'=> 'application/json; charset=utf-8'], JSON_PRETTY_PRINT); + + } + +} + diff --git a/app/Jobs/Util/WebhookHandler.php b/app/Jobs/Util/WebhookHandler.php index 222ad861b8d5..da2419ea3306 100644 --- a/app/Jobs/Util/WebhookHandler.php +++ b/app/Jobs/Util/WebhookHandler.php @@ -116,9 +116,9 @@ class WebhookHandler implements ShouldQueue ]); SystemLogger::dispatch( - $response, + array_merge((array)$response,$data), SystemLog::CATEGORY_WEBHOOK, - SystemLog::EVENT_WEBHOOK_RESPONSE, + SystemLog::EVENT_WEBHOOK_SUCCESS, SystemLog::TYPE_WEBHOOK_RESPONSE, $this->company->clients->first(), $this->company @@ -130,7 +130,7 @@ class WebhookHandler implements ShouldQueue } catch(\Exception $e){ - nlog($e->getMessage()); + nlog($e->getMessage()); SystemLogger::dispatch( $e->getMessage(), diff --git a/app/Models/SystemLog.php b/app/Models/SystemLog.php index b74db5fa0698..f4a9f43e24dc 100644 --- a/app/Models/SystemLog.php +++ b/app/Models/SystemLog.php @@ -52,6 +52,7 @@ class SystemLog extends Model const EVENT_MAIL_DELIVERY = 34; const EVENT_WEBHOOK_RESPONSE = 40; + const EVENT_WEBHOOK_SUCCESS = 41; const EVENT_PDF_RESPONSE = 50; const EVENT_AUTHENTICATION_FAILURE = 60; diff --git a/routes/api.php b/routes/api.php index 80a66092d997..e5323baa4fc9 100644 --- a/routes/api.php +++ b/routes/api.php @@ -197,6 +197,7 @@ Route::group(['middleware' => ['api_db', 'token_auth', 'locale'], 'prefix' => 'a Route::resource('subscriptions', 'SubscriptionController'); Route::post('subscriptions/bulk', 'SubscriptionController@bulk')->name('subscriptions.bulk'); + Route::get('statics', 'StaticController'); });