Skip to content

Commit 7820b50

Browse files
committed
Update ApiV1Dot1Controller, allow upto 5 similar push tokens
1 parent 989a8e9 commit 7820b50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Http/Controllers/Api/ApiV1Dot1Controller.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,7 @@ public function updatePush(Request $request)
11391139
$expoToken = $request->input('token');
11401140

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

11441144
$request->user()->update([
11451145
'notify_enabled' => $request->boolean('notify_enabled'),

0 commit comments

Comments
 (0)