Completed
Push — development ( 24186c...e0838b )
by Claudio
02:34
created
app/Http/Controllers/MailController.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
     public function send(array $configuration, string $view = 'habbo-web-mail.confirm-mail')
45 45
     {
46 46
         try {
47
-            Mail::send($view, $configuration, function ($message) use ($configuration) {
47
+            Mail::send($view, $configuration, function($message) use ($configuration) {
48 48
                 $message->from(Config::get('chocolatey.contact'), Config::get('chocolatey.name'));
49 49
                 $message->to($configuration['mail']);
50 50
             });
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -75,8 +75,9 @@  discard block
 block discarded – undo
75 75
      */
76 76
     public function forgotPassword(Request $request): JsonResponse
77 77
     {
78
-        if (($user = User::where('mail', $request->json()->get('email'))->first()) == null)
79
-            return response()->json('');
78
+        if (($user = User::where('mail', $request->json()->get('email'))->first()) == null) {
79
+                    return response()->json('');
80
+        }
80 81
 
81 82
         $this->send([
82 83
             'name' => $user->name,
@@ -97,8 +98,9 @@  discard block
 block discarded – undo
97 98
     {
98 99
         $mailRequest = Mail::where('token', $token)->where('used', '0')->first();
99 100
 
100
-        if ($mailRequest !== null)
101
-            $mailRequest->update(['used' => '1']);
101
+        if ($mailRequest !== null) {
102
+                    $mailRequest->update(['used' => '1']);
103
+        }
102 104
 
103 105
         return $mailRequest;
104 106
     }
Please login to merge, or discard this patch.