mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-08-14 23:51:41 +00:00
Fix for bug where subscriptions can't be fetched on fresh accounts. (#205)
This commit is contained in:
parent
597e861159
commit
3d8d592768
2 changed files with 3 additions and 3 deletions
|
@ -26,7 +26,7 @@ public class DatabaseHelper {
|
|||
CriteriaBuilder cb = s.getCriteriaBuilder();
|
||||
CriteriaQuery<User> cr = cb.createQuery(User.class);
|
||||
Root<User> root = cr.from(User.class);
|
||||
root.fetch("subscribed_ids", JoinType.INNER);
|
||||
root.fetch("subscribed_ids", JoinType.LEFT);
|
||||
cr.select(root).where(cb.equal(root.get("sessionId"), session));
|
||||
|
||||
return s.createQuery(cr).uniqueResult();
|
||||
|
|
|
@ -628,7 +628,7 @@ public class ResponseHelper {
|
|||
|
||||
Multithreading.runAsync(() -> {
|
||||
Session sess = DatabaseSessionFactory.createSession();
|
||||
me.kavin.piped.utils.obj.db.Channel channel = DatabaseHelper.getChannelFromId(sess, channelId);
|
||||
var channel = DatabaseHelper.getChannelFromId(sess, channelId);
|
||||
|
||||
if (channel == null) {
|
||||
ChannelInfo info = null;
|
||||
|
@ -866,7 +866,7 @@ public class ResponseHelper {
|
|||
|
||||
Session sess = DatabaseSessionFactory.createSession();
|
||||
|
||||
me.kavin.piped.utils.obj.db.Channel channel = DatabaseHelper.getChannelFromId(sess, channelId);
|
||||
var channel = DatabaseHelper.getChannelFromId(sess, channelId);
|
||||
|
||||
if (channel == null) {
|
||||
ChannelInfo info;
|
||||
|
|
Loading…
Reference in a new issue