summaryrefslogtreecommitdiff
path: root/src/popup
diff options
context:
space:
mode:
Diffstat (limited to 'src/popup')
-rw-r--r--src/popup/src/Comm/Send.elm28
-rw-r--r--src/popup/src/Struct/ServerReply.elm3
-rw-r--r--src/popup/src/Update/StoreParams.elm2
3 files changed, 8 insertions, 25 deletions
diff --git a/src/popup/src/Comm/Send.elm b/src/popup/src/Comm/Send.elm
index cda4cf2..1a939c5 100644
--- a/src/popup/src/Comm/Send.elm
+++ b/src/popup/src/Comm/Send.elm
@@ -1,10 +1,9 @@
-module Comm.Send exposing (try_sending)
+module Comm.Send exposing (commit)
-- Elm -------------------------------------------------------------------------
import Http
import Json.Decode
-import Json.Encode
-- Extension -------------------------------------------------------------------
import Comm.Okay
@@ -41,24 +40,9 @@ decoder =
--------------------------------------------------------------------------------
-- EXPORTED --------------------------------------------------------------------
--------------------------------------------------------------------------------
-try_sending : (
- Struct.Model.Type ->
- String ->
- (Struct.Model.Type -> (Maybe Json.Encode.Value)) ->
- (Maybe (Cmd Struct.Event.Type))
+commit : String -> (Cmd Struct.Event.Type)
+commit query =
+ (Http.send
+ Struct.Event.ServerReplied
+ (Http.get query (Json.Decode.list (decoder)))
)
-try_sending model recipient try_encoding_fun =
- case (try_encoding_fun model) of
- (Just serial) ->
- (Just
- (Http.send
- Struct.Event.ServerReplied
- (Http.post
- recipient
- (Http.jsonBody serial)
- (Json.Decode.list (decoder))
- )
- )
- )
-
- Nothing -> Nothing
diff --git a/src/popup/src/Struct/ServerReply.elm b/src/popup/src/Struct/ServerReply.elm
index e995f63..cc9d372 100644
--- a/src/popup/src/Struct/ServerReply.elm
+++ b/src/popup/src/Struct/ServerReply.elm
@@ -2,8 +2,7 @@ module Struct.ServerReply exposing (Type(..))
-- Elm -------------------------------------------------------------------------
--- -------------------------------------------------------------------
-import Struct.BattleSummary
+-- Extension -------------------------------------------------------------------
--------------------------------------------------------------------------------
-- TYPES -----------------------------------------------------------------------
diff --git a/src/popup/src/Update/StoreParams.elm b/src/popup/src/Update/StoreParams.elm
index f369be8..3472c13 100644
--- a/src/popup/src/Update/StoreParams.elm
+++ b/src/popup/src/Update/StoreParams.elm
@@ -24,7 +24,7 @@ apply_to : Struct.Model.Type -> (Struct.Model.Type, (Cmd Struct.Event.Type))
apply_to model =
(
model,
- (Action.Ports.store_params
+ (Action.Ports.set_params
(
(Struct.Flags.get_frequency model.flags),
(Json.Encode.encode