···52525353pub type Msg {
5454 /// Handle internal links navigation
5555- UserNavigatedTo(to: route.Route)
5555+ UserNavigatedTo(route: route.Route)
5656 /// User sent a request to the Server during startup to verify if the current
5757 /// token is still valid.
5858 UserRestoredSession(result: Result(session.Session, rsvp.Error(String)))
···155155pub fn update(model: Model, msg: Msg) -> #(Model, Effect(Msg)) {
156156 case model, msg {
157157 // ๏ธ NAVIGATION
158158- model, UserNavigatedTo(route) -> handle_navigation(model, route)
158158+ model, UserNavigatedTo(route:) -> handle_navigation(model, route)
159159160160 // ๏ LANGUAGE SELECTION
161161- model, NavbarMsg(navbar.UserSelectedLanguage(lang)) -> #(
161161+ model, NavbarMsg(msg: navbar.UserSelectedLanguage(lang:)) -> #(
162162 Model(..model, lang:),
163163 effect.none(),
164164 )
···168168 // If the Server successfully authenticated the User,
169169 // initialize its Session, and redirect them to the correct route.
170170 Model(session: session.Pending(on_success:, ..), ..),
171171- UserRestoredSession(Ok(session))
171171+ UserRestoredSession(result: Ok(session))
172172 -> #(
173173 Model(..model, session:, route: on_success, page: page.init(on_success)),
174174 modem.push(route.path(on_success), option.None, option.None),
···177177 // If it fails, start the Session as a Guest and redirect
178178 // the User accordingly, usually to the Login Page.
179179 Model(session: session.Pending(on_failure:, ..), ..),
180180- UserRestoredSession(Error(..))
180180+ UserRestoredSession(result: Error(..))
181181 -> {
182182 let session = session.Guest
183183 let route = on_failure
···188188189189 // User ended their Session and token has been removed.
190190 // Redirect user to the Home page.
191191- model, ServerRemovedToken(Ok(..)) -> {
191191+ model, ServerRemovedToken(result: Ok(..)) -> {
192192 let session = session.Guest
193193 let route = route.path(route.Home)
194194···245245 // ๏ Server successfully authenticated the Client, we can now store
246246 // the returned Session token in our application Model and access
247247 // protected routes.
248248- login.ServerAuthenticatedUser(session) -> #(
248248+ login.ServerAuthenticatedUser(session:) -> #(
249249 Model(..model, session:),
250250 route.Dashboard
251251 |> route.path
···254254255255 // ๏ฎ Server failed to authenticate the Client, display a error message
256256 // on the Login page and continue execution.
257257- login.ServerFailedToAuthenticate(reason) -> {
257257+ login.ServerFailedToAuthenticate(reason:) -> {
258258 let message = case reason {
259259 rsvp.HttpError(resp) -> resp.body
260260
···55pub type Session {
66 /// ๏ User is sucessfully authenticated and is allowed to
77 /// access protected routes.
88- Authenticated(token.Token)
88+ Authenticated(token: token.Token)
99 /// ๏ User is waiting for the Server to validate their credentials
1010 /// and will be redirected on success / failure.
1111 Pending(on_success: route.Route, on_failure: route.Route)