Redirect /@contentsections/{sectionIdentifier}/ to /@contentsections/{sectionIdentifier}/documentfolders

Former-commit-id: d543f7a115d2b3150a5bec2a24f83f152f3a2ab6
pull/10/head
Jens Pelzetter 2021-02-12 17:50:35 +01:00
parent 5965e3ca43
commit 499eff6321
1 changed files with 11 additions and 0 deletions

View File

@ -11,6 +11,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.transaction.Transactional;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Response;
@ -50,5 +51,15 @@ public class ContentSectionController {
throw new WebApplicationException(ex);
}
}
@GET
@Path("/{sectionIdentifier}")
@AuthorizationRequired
@Transactional(Transactional.TxType.REQUIRED)
public String redirectToDocumentFolders(
@PathParam("sectionIdentifier") final String sectionIdentifier
) {
return String.format("redirect:/%s/documentfolders", sectionIdentifier);
}
}