From d7f2bca914333271ebe3e44c14843b370fe587ed Mon Sep 17 00:00:00 2001 From: matt Date: Fri, 19 Jul 2024 21:54:07 +0100 Subject: [PATCH] fix to ensure build passes --- Http/Controllers/UnSubController.php | 30 ++++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Http/Controllers/UnSubController.php b/Http/Controllers/UnSubController.php index 8bb40fc..fbde111 100644 --- a/Http/Controllers/UnSubController.php +++ b/Http/Controllers/UnSubController.php @@ -136,7 +136,7 @@ function ($x) { $response = $client->request('GET', $url); } - $code = $response->getStatusCode(); + $code = $response->getStatusCode(); $body = $response->getBody(); @@ -144,7 +144,7 @@ function ($x) { $conversation->setMeta("List-Unsubscribe-Submitted", ["status" => $response->getStatusCode(), "reason" => $response->getReasonPhrase()]); $auth_user = auth()->user(); - error_log($auth_user); + error_log($auth_user); $created_by_user_id = (gettype($auth_user) == "object") ? $auth_user->id : $auth_user ; \App\Thread::create( $conversation, Thread::TYPE_LINEITEM, @@ -163,10 +163,10 @@ function ($x) { ] ); - if ($code>=200 && $code <=299) { - $conversation->changeStatus(Conversation::STATUS_CLOSED,$auth_user, false); - } - + if ($code>=200 && $code <=299) { + $conversation->changeStatus(Conversation::STATUS_CLOSED, $auth_user, false); + } + } catch (ConnectException $e) { $auth_user = auth()->user(); @@ -185,10 +185,10 @@ function ($x) { 'code' => 501, 'message' => "Sorry, something went wrong: " . $e->getMessage(), 'lineNumber' => $e->getLine(), - 'trace'=>$e->getTraceAsString(), - 'method' => ($unsubPost) ? 'POST' : "GET", - 'url' => $url, - 'opts' => $opts, + 'trace'=>$e->getTraceAsString(), + 'method' => ($unsubPost) ? 'POST' : "GET", + 'url' => $url, + 'opts' => $opts, ] ] ); @@ -210,11 +210,11 @@ function ($x) { 'code' => 501, 'message' => "Sorry, something went wrong: " . $e->getMessage(), 'lineNumber' => $e->getLine(), - 'trace'=>$e->getTraceAsString(), - 'method' => ($unsubPost) ? 'POST' : "GET", - 'user' => json_encode($auth_user), - 'url' => $url, - 'opts' => $opts, + 'trace'=>$e->getTraceAsString(), + 'method' => ($unsubPost) ? 'POST' : "GET", + 'user' => json_encode($auth_user), + 'url' => $url, + 'opts' => $opts, ] ] );