mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Watch webhooks on hosted
This commit is contained in:
parent
5e6fc9117a
commit
3df49b04ed
@ -17,6 +17,7 @@ use App\Models\Client as ClientModel;
|
|||||||
use App\Models\SystemLog;
|
use App\Models\SystemLog;
|
||||||
use App\Models\Webhook;
|
use App\Models\Webhook;
|
||||||
use App\Transformers\ArraySerializer;
|
use App\Transformers\ArraySerializer;
|
||||||
|
use App\Utils\Ninja;
|
||||||
use GuzzleHttp\Client;
|
use GuzzleHttp\Client;
|
||||||
use GuzzleHttp\RequestOptions;
|
use GuzzleHttp\RequestOptions;
|
||||||
use Illuminate\Bus\Queueable;
|
use Illuminate\Bus\Queueable;
|
||||||
@ -65,11 +66,12 @@ class WebhookHandler implements ShouldQueue
|
|||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle()
|
||||||
{//todo set multidb here
|
{
|
||||||
|
|
||||||
MultiDB::setDb($this->company->db);
|
MultiDB::setDb($this->company->db);
|
||||||
|
|
||||||
if (! $this->company || $this->company->is_disabled) {
|
//If the company is disabled, or if on hosted, the user is not a paid hosted user return early
|
||||||
|
if (! $this->company || $this->company->is_disabled || (Ninja::isHosted() && !$this->company->account->isPaidHostedClient())) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user