From 19c1a33d52dbc7d5bb10c71d3d4f667a049d703f Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Wed, 13 May 2015 18:32:59 +0300 Subject: [PATCH] Bug fixes --- app/Http/Middleware/ApiCheck.php | 2 +- app/Ninja/Mailers/UserMailer.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Middleware/ApiCheck.php b/app/Http/Middleware/ApiCheck.php index 00a90977b4..517dc905eb 100644 --- a/app/Http/Middleware/ApiCheck.php +++ b/app/Http/Middleware/ApiCheck.php @@ -35,7 +35,7 @@ class ApiCheck { } if (!Utils::isNinja()) { - return null; + return $next($request); } if (!Utils::isPro()) { diff --git a/app/Ninja/Mailers/UserMailer.php b/app/Ninja/Mailers/UserMailer.php index 5831e66b5c..6b5c450a7d 100644 --- a/app/Ninja/Mailers/UserMailer.php +++ b/app/Ninja/Mailers/UserMailer.php @@ -39,7 +39,7 @@ class UserMailer extends Mailer return; } - $entityType = $invoice->getEntityType(); + $entityType = $notificationType == 'approved' ? ENTITY_QUOTE : ENTITY_INVOICE; $view = "{$entityType}_{$notificationType}"; $data = [