Skip to content

Commit

Permalink
feat: URL for VATSIM.net Webhooks
Browse files Browse the repository at this point in the history
  • Loading branch information
CalumTowers committed Feb 24, 2024
1 parent 3f8bd42 commit 8769cfc
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ VATSIM_OAUTH_SCOPES=full_name,email,vatsim_details,country
VATSIM_API_KEY=
VATSIM_API_BASE=https://apiv2.vatsim.dev/v2/

VATSIM_NET_WEBHOOK_KEY=

#VATSIM_DATA_FEED=

MAPS_API_KEY=
Expand Down
6 changes: 6 additions & 0 deletions config/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,10 @@
'oauth_issuer_id' => env('MOODLE_OAUTH_ISSUER_ID'),
],

'vatsim-net' => [
'webhook' => [
'key' => env('VATSIM_NET_WEBHOOK_KEY'),
],
],

];
21 changes: 21 additions & 0 deletions routes/web-external.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

Route::group([
'prefix' => 'external',
'as' => 'external.',
], function () {

Route::group([
'prefix' => 'vatsim-net',
'as' => 'vatsim-net.',
], function () {

Route::get('webhook', function () {
return response()->json([
'status' => 'ok',
]);
})->name('webhook');

});

});
4 changes: 4 additions & 0 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@
Route::group(['domain' => config('app.url')], function () {
require base_path('routes/web-admin.php');
});

Route::group(['domain' => config('app.url')], function () {
require base_path('routes/web-external.php');
});

0 comments on commit 8769cfc

Please sign in to comment.