mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-08-14 23:51:41 +00:00
Fix unauthenticated subscriptions where clause.
This commit is contained in:
parent
83dc2e5833
commit
9edfd133f9
1 changed files with 3 additions and 2 deletions
|
@ -1070,9 +1070,10 @@ public class ResponseHelper {
|
|||
var cb = s.getCriteriaBuilder();
|
||||
var cu = cb.createCriteriaUpdate(UnauthenticatedSubscription.class);
|
||||
var root = cu.getRoot();
|
||||
cu.where(root.get("id").in(channelIds))
|
||||
cu
|
||||
.set(root.get("subscribedAt"), System.currentTimeMillis())
|
||||
.where(cb.lt(root.get("subscribedAt"), System.currentTimeMillis() - (TimeUnit.DAYS.toMillis(Constants.SUBSCRIPTIONS_EXPIRY) / 2)));
|
||||
.where(cb.lt(root.get("subscribedAt"), System.currentTimeMillis() - (TimeUnit.DAYS.toMillis(Constants.SUBSCRIPTIONS_EXPIRY) / 2)))
|
||||
.where(root.get("id").in(channelIds));
|
||||
s.createMutationQuery(cu).executeUpdate();
|
||||
tr.commit();
|
||||
} catch (Exception e) {
|
||||
|
|
Loading…
Reference in a new issue