Skip to content

Commit

Permalink
Merge pull request #123 from fleetbase/dev-v1.5.18
Browse files Browse the repository at this point in the history
patch send webhook and connection config
  • Loading branch information
roncodes authored Oct 18, 2024
2 parents 4ebc2a6 + 0888223 commit 9a9c200
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fleetbase/core-api",
"version": "1.5.17",
"version": "1.5.18",
"description": "Core Framework and Resources for Fleetbase API",
"keywords": [
"fleetbase",
Expand Down
2 changes: 1 addition & 1 deletion config/webhook-server.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/*
* The default queue that should be used to send webhook requests.
*/
'queue' => 'default',
'queue' => env('WEBHOOK_SERVER_QUEUE'),

/*
* The default http verb to use.
Expand Down
8 changes: 4 additions & 4 deletions src/Listeners/SendResourceLifecycleWebhook.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,13 @@ public function handle($event)
];

// Validate api credential, if not uuid then it could be internal
if (session('api_credential') && Str::isUuid(session('api_credential')) && ApiCredential::where('uuid', session('api_credential'))->exists()) {
$webhookRequestLogData['api_credential_uuid'] = session('api_credential');
if (isset($eventData['api_credential_uuid'])) {
$webhookRequestLogData['api_credential_uuid'] = $eventData['api_credential_uuid'];
}

// Check if it was a personal access token which made the request
if (session('api_credential') && PersonalAccessToken::where('id', session('api_credential'))->exists()) {
$webhookRequestLogData['access_token_id'] = session('api_credential');
if (isset($eventData['access_token_id'])) {
$webhookRequestLogData['access_token_id'] = $eventData['access_token_id'];
}

// log webhook error in logs
Expand Down

0 comments on commit 9a9c200

Please sign in to comment.