Skip to content
Snippets Groups Projects
Commit 2b1bbf34 authored by Yassine Doghri's avatar Yassine Doghri
Browse files

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

parent 37ee6d35
No related branches found
No related tags found
No related merge requests found
......@@ -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();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment