Skip to content

Commit

Permalink
Merge branch 'release-v6'
Browse files Browse the repository at this point in the history
  • Loading branch information
barryo committed Nov 2, 2024
2 parents 1aaa633 + 9bdce99 commit 5c96965
Show file tree
Hide file tree
Showing 15 changed files with 781 additions and 716 deletions.
33 changes: 33 additions & 0 deletions .idea/IXP-Manager.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

163 changes: 86 additions & 77 deletions .idea/php.xml

Large diffs are not rendered by default.

13 changes: 10 additions & 3 deletions app/Console/Commands/InManrs.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
*/
use Illuminate\Support\Facades\DB;

use Illuminate\Support\Facades\Http;
use IXP\Models\Customer;
/**
* Artisan command to update the in_peeringdb flag of members
Expand Down Expand Up @@ -59,12 +60,18 @@ class InManrs extends Command
public function handle(): int
{
// get list of peeringdb networks:
if( !( $json = file_get_contents( 'https://www.manrs.org/wp-json/manrs/v1/asn' ) ) ) {
$this->error( 'Could not load ASNs via MANRS\'s API' );
try {
$resp = Http::withHeaders( [
'X-Request-Client' => 'IXP Manager',
'X-Request-Client-Version' => APPLICATION_VERSION,
] )->throw()->acceptJson()
->get( 'https://api.manrs.org/asns' );
} catch(\Exception $e) {
$this->error( 'Could not load ASNs via MANRS\'s API: ' . $e->getMessage() );
return 1;
}

$asns = json_decode( $json, true );
$asns = $resp['asns'];

if( !is_array( $asns ) || !count( $asns ) ) {
$this->error( 'Empty or no ASNs returned from MANRS\'s API' );
Expand Down
2 changes: 2 additions & 0 deletions artisan
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ require __DIR__.'/vendor/autoload.php';

$app = require_once __DIR__.'/bootstrap/app.php';

require_once base_path() . '/version.php';

/*
|--------------------------------------------------------------------------
| Run The Artisan Application
Expand Down
106 changes: 53 additions & 53 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions config/logging.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
],

'deprecations' => [
'driver' => 'null',
'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
'trace' => false,
],
Expand Down
Loading

0 comments on commit 5c96965

Please sign in to comment.