From c5b99755e529bb3e5de04584115598e81a23eeb9 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sun, 19 Apr 2020 18:43:15 +0200 Subject: KB49 Vary feed URI based on resource type rendered. Change-Id: I02025bc5ce86aa6cda1b083c7a542cefb561c25d --- src/main/java/eu/mulk/mulkcms2/benki/posts/PostResource.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main') diff --git a/src/main/java/eu/mulk/mulkcms2/benki/posts/PostResource.java b/src/main/java/eu/mulk/mulkcms2/benki/posts/PostResource.java index c100e55..2e67208 100644 --- a/src/main/java/eu/mulk/mulkcms2/benki/posts/PostResource.java +++ b/src/main/java/eu/mulk/mulkcms2/benki/posts/PostResource.java @@ -109,7 +109,7 @@ public abstract class PostResource { var session = entityManager.unwrap(Session.class); var q = Post.findViewable(postFilter, session, reader, null, cursor, maxResults); - var feedUri = "/posts/feed"; + var feedUri = uri.getPath() + "/feed"; if (reader != null) { var pageKey = ensurePageKey(reader, feedUri); feedUri += "?page-key=" + pageKey.key.toString(36); @@ -143,7 +143,7 @@ public abstract class PostResource { var session = entityManager.unwrap(Session.class); var q = Post.findViewable(postFilter, session, reader, owner, cursor, maxResults); - var feedUri = String.format("/posts/~%s/feed", ownerName); + var feedUri = uri.getPath() + "/feed"; if (reader != null) { var pageKey = ensurePageKey(reader, feedUri); feedUri += "?page-key=" + pageKey.key.toString(36); -- cgit v1.2.3