mirror of
https://code.castopod.org/adaures/castopod
synced 2025-06-02 15:32:00 +00:00
fix(premium-podcasts): update query to validate subscription
This commit is contained in:
parent
94deaab3cd
commit
0e6d2945f2
@ -118,9 +118,11 @@ class SubscriptionModel extends Model
|
|||||||
->where([
|
->where([
|
||||||
'token' => hash('sha256', $token),
|
'token' => hash('sha256', $token),
|
||||||
'status' => 'active',
|
'status' => 'active',
|
||||||
'expires_at' => null,
|
|
||||||
])
|
])
|
||||||
|
->groupStart()
|
||||||
|
->where('expires_at', null)
|
||||||
->orWhere('`expires_at` > UTC_TIMESTAMP()', null, false)
|
->orWhere('`expires_at` > UTC_TIMESTAMP()', null, false)
|
||||||
|
->groupEnd()
|
||||||
->first();
|
->first();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user