remove unnecessary join

This commit is contained in:
Athou
2013-06-13 13:15:46 +02:00
parent 6abf16aa97
commit cc1248f350
2 changed files with 20 additions and 21 deletions

View File

@@ -101,7 +101,7 @@ public class FeedREST extends AbstractResourceREST {
entries.setErrorCount(subscription.getFeed().getErrorCount());
List<FeedEntryStatus> unreadEntries = feedEntryStatusDAO
.findByFeed(subscription.getFeed(), getUser(), unreadOnly,
.findBySubscription(subscription, unreadOnly,
newerThanDate, offset, limit + 1, order, true);
for (FeedEntryStatus status : unreadEntries) {
entries.getEntries().add(
@@ -227,8 +227,9 @@ public class FeedREST extends AbstractResourceREST {
FeedSubscription subscription = feedSubscriptionDAO.findById(getUser(),
Long.valueOf(req.getId()));
feedEntryStatusDAO.markFeedEntries(getUser(), subscription.getFeed(),
olderThan);
if (subscription != null) {
feedEntryStatusDAO.markSubscriptionEntries(subscription, olderThan);
}
return Response.ok(Status.OK).build();
}