Skip to content

Commit

Permalink
Fix UserPushSubscriptionManager using wrong AccessToken type (#1033)
Browse files Browse the repository at this point in the history
  • Loading branch information
BentiGorlich authored Aug 15, 2024
1 parent dc69144 commit 8c9b74a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Controller/Api/Notification/NotificationPushApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public function deleteSubscription(
try {
$conn = $this->entityManager->getConnection();
$stmt = $conn->prepare('DELETE FROM user_push_subscription WHERE user_id = :user AND api_token = :token');
$stmt->executeQuery(['user' => $user, 'token' => $apiToken]);
$stmt->executeQuery(['user' => $user->getId(), 'token' => $apiToken]);

return new JsonResponse(headers: $headers);
} catch (\Exception $e) {
Expand Down
2 changes: 1 addition & 1 deletion src/Service/Notification/UserPushSubscriptionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use App\Repository\SiteRepository;
use App\Repository\UserPushSubscriptionRepository;
use App\Service\SettingsManager;
use League\Bundle\OAuth2ServerBundle\Entity\AccessToken;
use League\Bundle\OAuth2ServerBundle\Model\AccessToken;
use Minishlink\WebPush\MessageSentReport;
use Minishlink\WebPush\Subscription;
use Minishlink\WebPush\WebPush;
Expand Down

0 comments on commit 8c9b74a

Please sign in to comment.