Skip to content

Commit

Permalink
Merge pull request #30 from SolidCharity/TP-20200608-FixVisitorLinkEx…
Browse files Browse the repository at this point in the history
…ternalUrl

Tp 20200608 fix visitor link external url
  • Loading branch information
tpokorra authored Jun 8, 2020
2 parents 4ecadb2 + 46c9071 commit 7ce2134
Show file tree
Hide file tree
Showing 2 changed files with 138 additions and 56 deletions.
15 changes: 11 additions & 4 deletions app/Http/Controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,18 @@ public function index(Request $request)
$participants = \App\Participant::where('tenant_id', $tenant_id)->get();
$tenant = \DB::table('tenants')->where('id', $tenant_id)->first();

$visitor_link = $request->getSchemeAndHttpHost();
// this is not a single instance installation
if (\DB::table('users')->where('tenant_id', "=", 1)->count() == 0)
if (!empty($tenant->external_url))
{
$visitor_link .= "/?uuid=".$tenant->uuid;
$visitor_link = $tenant->external_url;
}
else
{
$visitor_link = $request->getSchemeAndHttpHost();
// this is not a single instance installation
if (\DB::table('users')->where('tenant_id', "=", 1)->count() == 0)
{
$visitor_link .= "/?uuid=".$tenant->uuid;
}
}

$churchname = $tenant->name;
Expand Down
179 changes: 127 additions & 52 deletions package-lock.json

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

0 comments on commit 7ce2134

Please sign in to comment.