@@ -27,8 +27,9 @@ discard block |
||
| 27 | 27 | { |
| 28 | 28 | $userData = User::where('username', $request->input('name'))->first(); |
| 29 | 29 | |
| 30 | - if ($userData == null) |
|
| 31 | - return response()->json(null, 404); |
|
| 30 | + if ($userData == null) { |
|
| 31 | + return response()->json(null, 404); |
|
| 32 | + } |
|
| 32 | 33 | |
| 33 | 34 | $userPreferences = UserPreferences::find($userData->uniqueId); |
| 34 | 35 | |
@@ -48,13 +49,15 @@ discard block |
||
| 48 | 49 | { |
| 49 | 50 | $userData = User::find($userId); |
| 50 | 51 | |
| 51 | - if ($userData == null) |
|
| 52 | - return response()->json(null, 404); |
|
| 52 | + if ($userData == null) { |
|
| 53 | + return response()->json(null, 404); |
|
| 54 | + } |
|
| 53 | 55 | |
| 54 | 56 | $userPreferences = UserPreferences::find($userData->uniqueId); |
| 55 | 57 | |
| 56 | - if ($userPreferences != null && $userPreferences->profileVisible == '0') |
|
| 57 | - return response()->json(null, 404); |
|
| 58 | + if ($userPreferences != null && $userPreferences->profileVisible == '0') { |
|
| 59 | + return response()->json(null, 404); |
|
| 60 | + } |
|
| 58 | 61 | |
| 59 | 62 | return response()->json(new UserProfile($userData)); |
| 60 | 63 | } |
@@ -90,8 +93,9 @@ discard block |
||
| 90 | 93 | */ |
| 91 | 94 | public function getPhotos(int $userId): JsonResponse |
| 92 | 95 | { |
| 93 | - if (Photo::where('creator_id', $userId)->count() == 0) |
|
| 94 | - return response()->json([]); |
|
| 96 | + if (Photo::where('creator_id', $userId)->count() == 0) { |
|
| 97 | + return response()->json([]); |
|
| 98 | + } |
|
| 95 | 99 | |
| 96 | 100 | $userPhotos = Photo::where('creator_id', $userId)->get(); |
| 97 | 101 | |