| 1234567891011121314151617181920212223242526 |
- 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<Spry.Actions.RegisterAction>();
- return directives().set_typed<RegisterPagePublic>("page", Scope.PAGE, page);
- }
- }
- }
|