]> _ Git - fluidbook-toolbox.git/commitdiff
wip #7898
authorsoufiane <soufiane@cubedesigners.com>
Tue, 20 Jan 2026 15:43:36 +0000 (16:43 +0100)
committersoufiane <soufiane@cubedesigners.com>
Tue, 20 Jan 2026 15:43:36 +0000 (16:43 +0100)
app/Http/Controllers/Admin/Operations/FluidbookPublication/Services/KimplayOperation.php

index dbc51e71ec2c2e26d9307a5d47bd48d22dc7a77a..a800615974b8942b7f4a2694e473558a3e00f20e 100644 (file)
@@ -28,7 +28,7 @@ trait KimplayOperation
     protected function setupKimplayRoutes($segment, $routeName, $controller)
     {
         foreach (['services', 's'] as $s) {
-            Route::match(['post'], $s . '/kimplay', $controller . '@kimplay')->middleware([CORSMiddleware::class])->withoutMiddleware([VerifyCsrfToken::class]);
+            Route::match(['post'], $s . '/kimplay', $controller . '@kimplay')->withoutMiddleware([VerifyCsrfToken::class]);
         }
     }
 
@@ -41,7 +41,7 @@ trait KimplayOperation
             'phone' => 'required',
         ], [
             'required' => 'Ce champ est obligatoire',
-            'email' => 'Adresse email est incorrecte'
+            'email' => 'Adresse email incorrecte'
         ]);
 
         $validated = $validator->validated();
@@ -198,6 +198,7 @@ trait KimplayOperation
         $mail_to_kimplay->replyTo($email_reply_to, $email_from_name);
         $mail_to_kimplay->subject($email_kimplay_subject);
         $mail_to_kimplay->html($email_to_kimplay_body);
+        $mail_to_kimplay->attach($xls_file, ['as' => $attachment_basename . '.xlsx', 'mime' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']);
 
         // Duplicate the common e-mail settings and apply them to the user e-mail
         $mail_to_user = clone $mail_to_kimplay;
@@ -207,8 +208,6 @@ trait KimplayOperation
 
         // Back to setting up the mail for Kimplay
         $mail_to_kimplay->to($email_for_kimplay);
-        $mail_to_kimplay->attach($xls_file, ['as' => $attachment_basename . '.xlsx', 'mime' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']);
-
         $mail_to_kimplay->bcc($bcc);
 
         //=== Send the e-mails