diff --git a/app/Console/Commands/DumpFromGit.php b/app/Console/Commands/DumpFromGit.php index 8230c0f..534eecb 100644 --- a/app/Console/Commands/DumpFromGit.php +++ b/app/Console/Commands/DumpFromGit.php @@ -39,14 +39,17 @@ class DumpFromGit extends Command protected $description = 'Command description'; - - /** * Execute the console command. + * @throws \Exception no amin */ public function handle() { $firstAdminId = User::where('admin', 1)->first()->id; + if(empty($firstAdminId)) + throw new \Exception('firstAdminId is null'); + + $this->initializeGit(); $this->createFederations(); $this->createEntities($firstAdminId); diff --git a/app/Services/EntityService.php b/app/Services/EntityService.php index 691511f..f792b98 100644 --- a/app/Services/EntityService.php +++ b/app/Services/EntityService.php @@ -20,7 +20,7 @@ public function SaveEntityMetadataToFile($entity_id,$federation_id) { Storage::disk('metadata')->makeDirectory($folderName); } - $filePath = $folderName . '/' . $fileName . 'xml'; + $filePath = $folderName . '/' . $fileName; $content = $entity->xml_file; Storage::disk('metadata')->put($filePath, $content); } diff --git a/package-lock.json b/package-lock.json index 3f2c86b..9e87349 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "metaman-laravel", + "name": "metaman", "lockfileVersion": 3, "requires": true, "packages": {