mirror of
https://code.castopod.org/adaures/castopod
synced 2025-04-22 16:51:20 +00:00
fix(premium-podcasts): update query to validate subscription
This commit is contained in:
parent
1014c1f4d1
commit
550fb4ec3c
@ -116,11 +116,13 @@ class SubscriptionModel extends Model
|
||||
|
||||
return $subscriptionModel
|
||||
->where([
|
||||
'token' => hash('sha256', $token),
|
||||
'status' => 'active',
|
||||
'expires_at' => null,
|
||||
'token' => hash('sha256', $token),
|
||||
'status' => 'active',
|
||||
])
|
||||
->groupStart()
|
||||
->where('expires_at', null)
|
||||
->orWhere('`expires_at` > UTC_TIMESTAMP()', null, false)
|
||||
->groupEnd()
|
||||
->first();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user