Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/Http/Controllers/Api/AccountController.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public function markAllNotificationsAsRead(Request $request)

public function getSystemNotification(Request $request, $id)
{
$systemMessage = SystemMessage::active()->published()->where('key_id', $id)->first();
$systemMessage = SystemMessage::active()->published()->where('key_id', $id)->firstOrFail();
$cached = app(SystemMessageService::class)->getFull($systemMessage->id);

return response()->json(['data' => $cached]);
Expand Down Expand Up @@ -576,7 +576,7 @@ public function accountFriends(SearchFollowersRequest $request, $id)
$authProfileId = $request->user()->profile_id;

if ($authProfileId == $id) {
return $this->error('Cannot get mutual following with yourself', 200);
return $this->error('Cannot get mutual following with yourself', 422);
}

if (! $request->user()->can_follow || $request->user()->cannot('viewAny', [Profile::class])) {
Expand Down Expand Up @@ -812,7 +812,7 @@ public function accountVideoLikes(Request $request)
]);
}

public function defaultCursorTokenResponse($request, $limit)
public function defaultCursorTokenResponse(Request $request, int $limit)
{
return response()->json([
'data' => [],
Expand Down
Loading