From 661fc8ea0065c4d49a4ca7e86fac1fc7c0afca61 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 25 Feb 2021 11:09:06 +1100 Subject: [PATCH 1/2] Fixes for first account - verify user email! --- app/Jobs/Account/CreateAccount.php | 12 +++++++++++- app/Transformers/AccountTransformer.php | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/app/Jobs/Account/CreateAccount.php b/app/Jobs/Account/CreateAccount.php index d145fdc8e2a1..882604331bab 100644 --- a/app/Jobs/Account/CreateAccount.php +++ b/app/Jobs/Account/CreateAccount.php @@ -23,6 +23,7 @@ use App\Jobs\Mail\NinjaMailerObject; use App\Jobs\User\CreateUser; use App\Jobs\Util\VersionCheck; use App\Mail\Admin\AccountCreatedObject; +use App\Mail\Admin\VerifyUserObject; use App\Models\Account; use App\Notifications\Ninja\NewAccountCreated; use App\Utils\Ninja; @@ -95,12 +96,21 @@ class CreateAccount //todo implement SLACK notifications //$sp035a66->notification(new NewAccountCreated($spaa9f78, $sp035a66))->ninja(); + // $nmo = new NinjaMailerObject; + // $nmo->mailable = new NinjaMailer((new AccountCreatedObject($spaa9f78, $sp035a66))->build()); + // $nmo->company = $sp035a66; + // $nmo->to_user = $spaa9f78; + // $nmo->settings = $sp035a66->settings; + $nmo = new NinjaMailerObject; - $nmo->mailable = new NinjaMailer((new AccountCreatedObject($spaa9f78, $sp035a66))->build()); + $nmo->mailable = new NinjaMailer((new VerifyUserObject($spaa9f78, $sp035a66))->build()); $nmo->company = $sp035a66; $nmo->to_user = $spaa9f78; $nmo->settings = $sp035a66->settings; + NinjaMailerJob::dispatch($nmo); + + NinjaMailerJob::dispatchNow($nmo); VersionCheck::dispatchNow(); diff --git a/app/Transformers/AccountTransformer.php b/app/Transformers/AccountTransformer.php index 49878080f8c2..742a4769576c 100644 --- a/app/Transformers/AccountTransformer.php +++ b/app/Transformers/AccountTransformer.php @@ -77,6 +77,7 @@ class AccountTransformer extends EntityTransformer 'debug_enabled' => (bool) config('ninja.debug_enabled'), 'is_docker' => (bool) config('ninja.is_docker'), 'is_scheduler_running' => (bool) $account->is_scheduler_running, + 'default_company_id' => (string) $this->encodePrimaryKey($account->default_company_id), ]; } From dbde9f5ca45f39c203ca859c506b3f838ba51a5d Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 25 Feb 2021 12:09:22 +1100 Subject: [PATCH 2/2] Fixes for release file - including .git folder! --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f073896995b9..348be085a873 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -50,7 +50,7 @@ jobs: sudo rm -rf node_modules - name: Build project # This would actually build your project, using zip for an example artifact run: | - zip -r ./invoiceninja.zip ./ + zip -r ./invoiceninja.zip .* -x "../*" - name: Get tag name id: get_tag_name