Skip to content
This repository was archived by the owner on Feb 4, 2024. It is now read-only.

Commit 4decbd4

Browse files
Merge pull request #2314 from star0713/feature/implement-gedcom-export
Feature/implement gedcom export
2 parents ce7d9b2 + 02ad0ac commit 4decbd4

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

app/Http/Controllers/Gedcom/Export.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Illuminate\Http\Request;
99
use App\Models\Person;
1010
use Illuminate\Support\Facades\Log;
11+
use App\Models\Family;
1112

1213
class Export extends Controller
1314
{
@@ -22,7 +23,7 @@ public function __invoke(Request $request)
2223
ExportGedCom::dispatch($file, $request->user());
2324

2425
Log::info("Read gedfile from ". \Storage::disk("public")->path($file));
25-
var_dump(\Storage::disk("public")->path($file), "controller");
26+
// var_dump(\Storage::disk("public")->path($file), "controller");
2627
return json_encode([
2728
'file' => \Storage::disk('public')->get($file),
2829
'name' => $file,

app/Jobs/ExportGedCom.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ public function handle()
4141
$p_id = $this->user->person_id; // person_id
4242
$f_id = 0; // family_id
4343

44-
$tenant = Manager::fromModel($this->user->company(), $this->user);
45-
$tenant->connect();
44+
// $tenant = Manager::fromModel($this->user->company(), $this->user);
45+
// $tenant->connect();
4646

4747
$family = Family::where("husband_id", $this->user->id)
4848
->orWhere("wife_id", $this->user->id)
@@ -70,7 +70,7 @@ public function handle()
7070
$content = $writer->getGedcomPerson();
7171

7272
Log::info("content from getGedcomPerson function => \n $content");
73-
var_dump(\Storage::disk('public')->path($this->file), "job");
73+
// var_dump(\Storage::disk('public')->path($this->file), "job");
7474
\Storage::disk('public')->put($this->file, $content);
7575
}
7676
}

routes/api.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1490,7 +1490,7 @@
14901490
Route::get('plans', [PlanController::class, 'getPlans']);
14911491
});
14921492

1493-
Route::middleware(['auth', 'api'])
1493+
Route::middleware(['auth', 'api', 'multitenant'])
14941494
->group(function () {
14951495
Route::get('get_companies', [CompanyIndex::class, 'getCompany']);
14961496
Route::get('get_person', [PersonaliasIndex::class, 'getPerson']);

0 commit comments

Comments
 (0)