impls basic Wealth editing
This commit is contained in:
@@ -334,6 +334,7 @@ type RequestData
|
||||
| BuyPayload Loot (Maybe Float) (List (Maybe Float))
|
||||
| GrabPayload Loot
|
||||
| AddPayload String Loot
|
||||
| WealthPayload Float
|
||||
|
||||
|
||||
zip xs ys =
|
||||
@@ -396,6 +397,9 @@ buildPayload data =
|
||||
, ( "source_name", E.string sourceName )
|
||||
]
|
||||
|
||||
WealthPayload amount ->
|
||||
E.float amount
|
||||
|
||||
|
||||
confirmAction : String -> RequestData -> Cmd Msg
|
||||
confirmAction id data =
|
||||
@@ -421,6 +425,11 @@ confirmAction id data =
|
||||
( "http://localhost:8088/api/players/" ++ id ++ "/claims"
|
||||
, "POST"
|
||||
)
|
||||
|
||||
WealthPayload _ ->
|
||||
( "http://localhost:8088/api/players/" ++ id ++ "/wealth"
|
||||
, "PUT"
|
||||
)
|
||||
in
|
||||
Http.request
|
||||
{ method = method
|
||||
|
||||
Reference in New Issue
Block a user