Skip to content

Commit 197d712

Browse files
committed
Merge branch 'main' into upgrade/intervention-v3
2 parents abb2eaa + 875aeb9 commit 197d712

File tree

11 files changed

+1159
-1105
lines changed

11 files changed

+1159
-1105
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ We'd like to thank these **amazing companies** for sponsoring us. If you are int
2626
- [Tinkerwell](https://tinkerwell.app)
2727
- [BairesDev](https://www.bairesdev.com/sponsoring-open-source-projects/)
2828
- [N-iX](https://www.n-ix.com/)
29+
- [Litslink](https://litslink.com/)
2930

3031
## Requirements
3132

app/Http/Controllers/Auth/GitHubController.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
use App\Jobs\UpdateProfile;
77
use App\Models\User;
88
use App\Social\GitHubUser;
9+
use GuzzleHttp\Exception\ClientException;
10+
use GuzzleHttp\Exception\ServerException;
911
use Illuminate\Database\Eloquent\ModelNotFoundException;
1012
use Illuminate\Http\RedirectResponse;
1113
use Illuminate\Support\Facades\Auth;
@@ -45,9 +47,15 @@ public function handleProviderCallback()
4547
return $this->userFound($user, $socialiteUser);
4648
}
4749

48-
private function getSocialiteUser(): SocialiteUser
50+
private function getSocialiteUser(): SocialiteUser|RedirectResponse
4951
{
50-
return Socialite::driver('github')->user();
52+
try {
53+
return Socialite::driver('github')->user();
54+
} catch (ClientException|ServerException $e) {
55+
$this->error('An error occurred while trying to log in with GitHub. Please try again.');
56+
57+
return redirect()->route('login');
58+
}
5159
}
5260

5361
private function userFound(User $user, SocialiteUser $socialiteUser): RedirectResponse

app/Http/Requests/CreateReplyRequest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,9 @@ public function replyAble(): ReplyAble
3535
private function findReplyAble(int $id, string $type): ReplyAble
3636
{
3737
return match ($type) {
38-
Thread::TABLE => Thread::find($id),
38+
Thread::TABLE => Thread::findOrFail($id),
39+
default => abort(404),
3940
};
40-
41-
abort(404);
4241
}
4342

4443
public function author(): User

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
"algolia/scout-extended": "^3.1",
99
"blade-ui-kit/blade-heroicons": "^2.3",
1010
"blade-ui-kit/blade-icons": "^1.6",
11-
"blade-ui-kit/blade-ui-kit": "^0.6.3",
11+
"blade-ui-kit/blade-ui-kit": "^0.7.0",
1212
"blade-ui-kit/blade-zondicons": "^1.5",
13-
"codeat3/blade-simple-icons": "^5.0",
13+
"codeat3/blade-simple-icons": "^6.2",
1414
"guzzlehttp/guzzle": "^7.2",
1515
"innocenzi/bluesky-notification-channel": "^0.2.0",
1616
"intervention/image": "^3.0",
17-
"laravel-notification-channels/telegram": "^5.0",
17+
"laravel-notification-channels/telegram": "^6.0",
1818
"laravel-notification-channels/twitter": "^8.1.1",
1919
"laravel/framework": "^11.5",
2020
"laravel/horizon": "^5.22",

0 commit comments

Comments
 (0)