mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
fix for admin api
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package com.commafeed.backend.services;
|
||||
|
||||
import javax.ejb.Stateless;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import com.commafeed.backend.dao.FeedEntryStatusDAO;
|
||||
import com.commafeed.backend.model.FeedEntryStatus;
|
||||
import com.commafeed.backend.model.User;
|
||||
|
||||
@Stateless
|
||||
public class FeedEntryService {
|
||||
|
||||
@Inject
|
||||
FeedEntryStatusDAO feedEntryStatusDAO;
|
||||
|
||||
public void markEntry(User user, Long entryId, boolean read) {
|
||||
FeedEntryStatus status = feedEntryStatusDAO.findById(user, entryId);
|
||||
status.setRead(read);
|
||||
feedEntryStatusDAO.update(status);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user