Commit 2b1bbf34 authored by Yassine Doghri's avatar Yassine Doghri
Browse files

fix(premium-podcasts): update query to validate subscription

parent 37ee6d35
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -118,9 +118,11 @@ class SubscriptionModel extends Model
            ->where([
                'token'  => hash('sha256', $token),
                'status' => 'active',
                'expires_at' => null,
            ])
            ->groupStart()
            ->where('expires_at', null)
            ->orWhere('`expires_at` > UTC_TIMESTAMP()', null, false)
            ->groupEnd()
            ->first();
    }