mirror of
https://github.com/ad-aures/castopod.git
synced 2026-03-31 21:39:20 +02:00
fix(premium-podcasts): update query to validate subscription
This commit is contained in:
parent
37ee6d35b4
commit
2b1bbf3430
1 changed files with 5 additions and 3 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue