Skip to content

Commit

Permalink
Update ApiV1Dot1Controller, allow upto 5 similar push tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
dansup committed Oct 8, 2024
1 parent 989a8e9 commit 7820b50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Api/ApiV1Dot1Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,7 @@ public function updatePush(Request $request)
$expoToken = $request->input('token');

$existing = User::where('profile_id', '!=', $pid)->whereExpoToken($expoToken)->count();
abort_if($existing, 400, 'Push token is already used by another account');
abort_if($existing && $existing > 5, 400, 'Push token is already used by another account');

$request->user()->update([
'notify_enabled' => $request->boolean('notify_enabled'),
Expand Down

0 comments on commit 7820b50

Please sign in to comment.