Wiki: Add top-level redirect to Home.
Change-Id: Ide7605daf4b86d71181875b25ca8a7fb747b0beb
diff --git a/src/main/java/eu/mulk/mulkcms2/benki/wiki/WikiResource.java b/src/main/java/eu/mulk/mulkcms2/benki/wiki/WikiResource.java
index 0f7aa3f..090dafd 100644
--- a/src/main/java/eu/mulk/mulkcms2/benki/wiki/WikiResource.java
+++ b/src/main/java/eu/mulk/mulkcms2/benki/wiki/WikiResource.java
@@ -11,6 +11,8 @@
import io.quarkus.qute.api.ResourcePath;
import io.quarkus.security.Authenticated;
import io.quarkus.security.identity.SecurityIdentity;
+import java.net.URI;
+import java.net.URISyntaxException;
import java.time.OffsetDateTime;
import java.time.format.DateTimeFormatter;
import java.time.format.FormatStyle;
@@ -28,6 +30,9 @@
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
+import javax.ws.rs.RedirectionException;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status;
import org.jboss.logging.Logger;
import org.jsoup.Jsoup;
import org.jsoup.safety.Whitelist;
@@ -55,6 +60,12 @@
@Inject SecurityIdentity identity;
@GET
+ @Authenticated
+ public Response getRoot() throws URISyntaxException {
+ return Response.seeOther(new URI("/wiki/Home")).build();
+ }
+
+ @GET
@Path("/{pageName}")
@Produces(TEXT_HTML)
@Authenticated