using Statum; using Spry; namespace {{NS}} { public class RegisterPagePublic : Object { public Statum.Model.ActionDto register { get; set; } } /** * Entrypoint for /register: hydrates the page slot with the register * action reference; already-authenticated visitors bounce home. */ public class RegisterEntrypoint : StatumEntrypoint { public override async DirectiveBuilder handle() throws GLib.Error { if (!SpryAuth.current(request).is_anonymous) { return directives().navigate("/"); } var page = new RegisterPagePublic(); page.register = action_registry.author(); return directives().set_typed("page", Scope.PAGE, page); } } }