diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/eu/mulk/mulkcms2/benki/wiki/WikiResource.java | 11 |
1 files changed, 11 insertions, 0 deletions
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.TemplateInstance; 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.POST; 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 @@ public class WikiResource { @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 |