mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 10:17:30 -04:00
commit
2d5a30490e
@ -152,7 +152,7 @@ class AccountApiController extends BaseAPIController
|
||||
$account->devices = json_encode($devices);
|
||||
$account->save();
|
||||
|
||||
return $this->response($account);
|
||||
return $this->response($newDevice);
|
||||
|
||||
}
|
||||
|
||||
@ -185,7 +185,7 @@ class AccountApiController extends BaseAPIController
|
||||
$account->devices = json_encode($devices);
|
||||
$account->save();
|
||||
|
||||
return $this->response($account);
|
||||
return $this->response($newDevice);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10,6 +10,7 @@ use App\Events\QuoteInvitationWasViewed;
|
||||
use App\Events\QuoteInvitationWasApproved;
|
||||
use App\Events\PaymentWasCreated;
|
||||
use App\Ninja\Notifications;
|
||||
use App\Services\PushService;
|
||||
|
||||
class NotificationListener
|
||||
{
|
||||
@ -17,7 +18,7 @@ class NotificationListener
|
||||
protected $contactMailer;
|
||||
protected $pushService;
|
||||
|
||||
public function __construct(UserMailer $userMailer, ContactMailer $contactMailer, Notifications\PushService $pushService)
|
||||
public function __construct(UserMailer $userMailer, ContactMailer $contactMailer, PushService $pushService)
|
||||
{
|
||||
$this->userMailer = $userMailer;
|
||||
$this->contactMailer = $contactMailer;
|
||||
|
@ -194,7 +194,6 @@ class AccountRepository
|
||||
$account = $this->getNinjaAccount();
|
||||
$lastInvoice = Invoice::withTrashed()->whereAccountId($account->id)->orderBy('public_id', 'DESC')->first();
|
||||
$publicId = $lastInvoice ? ($lastInvoice->public_id + 1) : 1;
|
||||
|
||||
$invoice = new Invoice();
|
||||
$invoice->account_id = $account->id;
|
||||
$invoice->user_id = $account->users()->first()->id;
|
||||
|
Loading…
x
Reference in New Issue
Block a user