mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
return 404 if not found
This commit is contained in:
@@ -218,6 +218,9 @@ public class FeedREST extends AbstractResourceREST {
|
|||||||
|
|
||||||
Preconditions.checkNotNull(id);
|
Preconditions.checkNotNull(id);
|
||||||
FeedSubscription sub = feedSubscriptionDAO.findById(getUser(), id);
|
FeedSubscription sub = feedSubscriptionDAO.findById(getUser(), id);
|
||||||
|
if (sub == null) {
|
||||||
|
return Response.status(Status.NOT_FOUND).build();
|
||||||
|
}
|
||||||
return Response.ok(Subscription.build(sub, 0)).build();
|
return Response.ok(Subscription.build(sub, 0)).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user