mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
return 404 if no category is found
This commit is contained in:
@@ -270,6 +270,9 @@ public class CategoryREST extends AbstractResourceREST {
|
|||||||
|
|
||||||
FeedCategory category = feedCategoryDAO.findById(getUser(),
|
FeedCategory category = feedCategoryDAO.findById(getUser(),
|
||||||
Long.valueOf(req.getId()));
|
Long.valueOf(req.getId()));
|
||||||
|
if (category == null) {
|
||||||
|
return Response.status(Status.NOT_FOUND).build();
|
||||||
|
}
|
||||||
category.setCollapsed(req.isCollapse());
|
category.setCollapsed(req.isCollapse());
|
||||||
feedCategoryDAO.update(category);
|
feedCategoryDAO.update(category);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user