Change the way we figure out zones in packets, some packet testing, fix Echomail import
This commit is contained in:
@@ -6,8 +6,7 @@ use Illuminate\Console\Command;
|
||||
use Symfony\Component\HttpFoundation\File\File;
|
||||
|
||||
use App\Classes\FTN\Packet;
|
||||
use App\Jobs\ProcessPacket as Job;
|
||||
use App\Models\Domain;
|
||||
use App\Models\Zone;
|
||||
|
||||
class PacketInfo extends Command
|
||||
{
|
||||
@@ -16,7 +15,7 @@ class PacketInfo extends Command
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'packet:info {pkt : Packet to process} {domain : Domain the packet is from}';
|
||||
protected $signature = 'packet:info {pkt : Packet to process} {zone? : Zone the packet is from}';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
@@ -34,9 +33,9 @@ class PacketInfo extends Command
|
||||
public function handle()
|
||||
{
|
||||
$f = new File($this->argument('pkt'));
|
||||
$d = Domain::where('name',$this->argument('domain'))->singleOrFail();
|
||||
$z = $this->argument('zone') ? Zone::where('zone_id',$this->argument('zone'))->singleOrFail() : NULL;
|
||||
|
||||
$pkt = Packet::open($f,$d);
|
||||
$pkt = Packet::open($f,$z);
|
||||
|
||||
$this->info(sprintf('Packet Type: %s',$pkt->type));
|
||||
$this->info(sprintf('From: %s to %s',$pkt->fftn,$pkt->tftn));
|
||||
|
Reference in New Issue
Block a user