Skip to content

Commit

Permalink
update minimal magic link rule
Browse files Browse the repository at this point in the history
  • Loading branch information
jxxcarlson committed Jul 12, 2024
1 parent f97c125 commit 69a4c51
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions preview/src/ReviewConfig.elm
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ configUsers =
-- |> ReplaceFunction.makeRule
]

-- HERE
configMagicLinkMinimal : List Rule
configMagicLinkMinimal =
[ Import.qualified "Types" [ "Auth.Common", "MagicLink.Types" ] |> Import.makeRule
Expand All @@ -118,21 +119,19 @@ configMagicLinkMinimal =
, TypeVariant.makeRule "Types" "ToBackend" [ "AuthToBackend Auth.Common.ToBackend" ]
, FieldInTypeAlias.makeRule "Types" "LoadedModel" [ "magicLinkModel : MagicLink.Types.Model" ]
, Import.qualified "Frontend" [ "MagicLink.Types", "Auth.Common", "MagicLink.Frontend", "MagicLink.Auth", "Pages.SignIn", "Pages.Home", "Pages.Admin", "Pages.TermsOfService", "Pages.Notes" ] |> Import.makeRule
, Import.qualified "Backend" ["Auth.Flow"] |> Import.makeRule
, Initializer.makeRule "Frontend" "initLoaded" [ { field = "magicLinkModel", value = "Pages.SignIn.init loadingModel.initUrl" } ]
, TypeVariant.makeRule "Types"
"ToFrontend"
[ "AuthToFrontend Auth.Common.ToFrontend"
, "AuthSuccess Auth.Common.UserInfo"
, "UserInfoMsg (Maybe Auth.Common.UserInfo)"
, "CheckSignInResponse (Result BackendDataStatus User.SignInData)"
, "GetLoginTokenRateLimited"
, "RegistrationError String"
, "SignInError String"
, "UserSignedIn (Maybe User.User)"
, "UserRegistered User.User"
, "GotUserDictionary (Dict.Dict User.EmailString User.User)"
, "GotMessage String"
]
, ClauseInCase.init "Backend" "updateFromFrontend" "AuthToBackend authMsg" "Auth.Flow.updateFromFrontend (MagicLink.Auth.backendConfig model) clientId sessionId authMsg model" |> ClauseInCase.makeRule

]


Expand Down

0 comments on commit 69a4c51

Please sign in to comment.