summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/login/src/Comm/SendRecovery.elm')
-rw-r--r--src/login/src/Comm/SendRecovery.elm40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/login/src/Comm/SendRecovery.elm b/src/login/src/Comm/SendRecovery.elm
new file mode 100644
index 0000000..e9fd3a9
--- /dev/null
+++ b/src/login/src/Comm/SendRecovery.elm
@@ -0,0 +1,40 @@
+module Comm.SendRecovery exposing (try)
+
+-- Elm -------------------------------------------------------------------------
+import Json.Encode
+
+-- Map -------------------------------------------------------------------
+import Comm.Send
+
+import Constants.IO
+
+import Struct.Event
+import Struct.Model
+
+--------------------------------------------------------------------------------
+-- TYPES ------------------------------------------------------------------------
+--------------------------------------------------------------------------------
+
+--------------------------------------------------------------------------------
+-- LOCAL -----------------------------------------------------------------------
+--------------------------------------------------------------------------------
+try_encoding : Struct.Model.Type -> (Maybe Json.Encode.Value)
+try_encoding model =
+ (Just
+ (Json.Encode.object
+ [
+ ("eml", (Json.Encode.string model.email1))
+ ]
+ )
+ )
+
+--------------------------------------------------------------------------------
+-- EXPORTED --------------------------------------------------------------------
+--------------------------------------------------------------------------------
+try : Struct.Model.Type -> (Maybe (Cmd Struct.Event.Type))
+try model =
+ (Comm.Send.try_sending
+ model
+ Constants.IO.login_recovery_handler
+ try_encoding
+ )