diff --git a/app/Http/Controllers/Api/V4/ClaimController.php b/app/Http/Controllers/Api/V4/ClaimController.php index 08c2aa4..102ad0d 100644 --- a/app/Http/Controllers/Api/V4/ClaimController.php +++ b/app/Http/Controllers/Api/V4/ClaimController.php @@ -32,6 +32,9 @@ class ClaimController extends Controller ); } + // Add brand id from service. + $claimModel->brand_id = $service->brand->getKey(); + // Add customer relation if exist. $crmCustomer = CustomerInfo::getFromEmail($claimModel->brand, $claimModel->email)->first(); if (!is_null($crmCustomer)) { diff --git a/app/Http/Requests/Api/V4/SendClaimRequest.php b/app/Http/Requests/Api/V4/SendClaimRequest.php index 145aab7..bf84057 100644 --- a/app/Http/Requests/Api/V4/SendClaimRequest.php +++ b/app/Http/Requests/Api/V4/SendClaimRequest.php @@ -80,7 +80,6 @@ class SendClaimRequest extends BaseApiRequest } ], 'message' => 'required|string|min:3', - 'brand_id' => 'required|integer|exists:brands,id', 'subject_id' => 'required|integer|exists:claim_subjects,id', ]; } diff --git a/client b/client index f098255..59c94e1 160000 --- a/client +++ b/client @@ -1 +1 @@ -Subproject commit f09825531bb86c5df3b4a443620534eeda3578b4 +Subproject commit 59c94e16e57e17d33f05099f3f29d93d88324771 diff --git a/composer.json b/composer.json index c18973f..394bd4f 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "ldc/ldccrm", - "version": "4.1.8", + "version": "4.1.9", "type": "project", "description": "LDC CRM", "license": "MIT", diff --git a/tests/Client/CrmClientClaimTest.php b/tests/Client/CrmClientClaimTest.php index fb1d36e..b563e70 100644 --- a/tests/Client/CrmClientClaimTest.php +++ b/tests/Client/CrmClientClaimTest.php @@ -26,7 +26,6 @@ class CrmClientClaimTest extends CrmClientTester 'claim@hotmail.fr', 'Ceci est un message.', 1, - 1, '10 rue des totos', 'Le Mans', '72100', @@ -55,7 +54,6 @@ class CrmClientClaimTest extends CrmClientTester 'claim@hotmail.fr', 'Ceci est un message.', 1, - 1, )); $this->assertTrue(ModelsClaim::query()->where('email', 'claim@hotmail.fr')->exists()); } @@ -74,7 +72,6 @@ class CrmClientClaimTest extends CrmClientTester 'claim@hotmail.fr', 'Ceci est un message.', 0, - 0, ); $this->assertSame(0, ModelsClaim::count()); }