forked from Archives/Athou_commafeed
use pathparam for id
This commit is contained in:
@@ -264,7 +264,7 @@ public class FeedUtils {
|
|||||||
|
|
||||||
public static String getFaviconUrl(FeedSubscription subscription,
|
public static String getFaviconUrl(FeedSubscription subscription,
|
||||||
String publicUrl) {
|
String publicUrl) {
|
||||||
return removeTrailingSlash(publicUrl) + "/rest/feed/favicon?id="
|
return removeTrailingSlash(publicUrl) + "/rest/feed/favicon/"
|
||||||
+ subscription.getId();
|
+ subscription.getId();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -250,9 +250,10 @@ public class FeedREST extends AbstractResourceREST {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("/favicon")
|
@Path("/favicon/{id}")
|
||||||
@ApiOperation(value = "Fetch a feed's icon", notes = "Fetch icon of a feed")
|
@ApiOperation(value = "Fetch a feed's icon", notes = "Fetch a feed's icon")
|
||||||
public Response getFavicon(@QueryParam("id") Long id) {
|
public Response getFavicon(
|
||||||
|
@ApiParam(value = "subscription id") @PathParam("id") Long id) {
|
||||||
|
|
||||||
Preconditions.checkNotNull(id);
|
Preconditions.checkNotNull(id);
|
||||||
FeedSubscription subscription = feedSubscriptionDAO.findById(getUser(),
|
FeedSubscription subscription = feedSubscriptionDAO.findById(getUser(),
|
||||||
@@ -277,7 +278,7 @@ public class FeedREST extends AbstractResourceREST {
|
|||||||
|
|
||||||
CacheControl cacheControl = new CacheControl();
|
CacheControl cacheControl = new CacheControl();
|
||||||
cacheControl.setMaxAge(2592000);
|
cacheControl.setMaxAge(2592000);
|
||||||
cacheControl.setPrivate(false);
|
cacheControl.setPrivate(true);
|
||||||
// trying to replicate "public, max-age=2592000"
|
// trying to replicate "public, max-age=2592000"
|
||||||
builder.cacheControl(cacheControl);
|
builder.cacheControl(cacheControl);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user