mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-26 13:21:42 +03:00
Remove some Debug statements.
This commit is contained in:
parent
dfb9a81761
commit
da6e7d7313
@ -15,6 +15,7 @@ type Effect msg
|
|||||||
| Cmd (Cmd msg)
|
| Cmd (Cmd msg)
|
||||||
| Batch (List (Effect msg))
|
| Batch (List (Effect msg))
|
||||||
| GetStargazers (Result Http.Error Int -> msg)
|
| GetStargazers (Result Http.Error Int -> msg)
|
||||||
|
| SetField { formId : String, name : String, value : String }
|
||||||
| FetchRouteData
|
| FetchRouteData
|
||||||
{ data : Maybe FormDecoder.FormData
|
{ data : Maybe FormDecoder.FormData
|
||||||
, toMsg : Result Http.Error Url -> msg
|
, toMsg : Result Http.Error Url -> msg
|
||||||
@ -74,6 +75,9 @@ map fn effect =
|
|||||||
, toMsg = fetchInfo.toMsg >> fn
|
, toMsg = fetchInfo.toMsg >> fn
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SetField info ->
|
||||||
|
SetField info
|
||||||
|
|
||||||
SubmitFetcher fetcher ->
|
SubmitFetcher fetcher ->
|
||||||
fetcher
|
fetcher
|
||||||
|> Pages.Fetcher.map fn
|
|> Pages.Fetcher.map fn
|
||||||
@ -96,6 +100,7 @@ perform :
|
|||||||
-> Cmd msg
|
-> Cmd msg
|
||||||
, fromPageMsg : pageMsg -> msg
|
, fromPageMsg : pageMsg -> msg
|
||||||
, key : Browser.Navigation.Key
|
, key : Browser.Navigation.Key
|
||||||
|
, setField : { formId : String, name : String, value : String } -> Cmd msg
|
||||||
}
|
}
|
||||||
-> Effect pageMsg
|
-> Effect pageMsg
|
||||||
-> Cmd msg
|
-> Cmd msg
|
||||||
@ -107,6 +112,9 @@ perform ({ fromPageMsg, key } as helpers) effect =
|
|||||||
Cmd cmd ->
|
Cmd cmd ->
|
||||||
Cmd.map fromPageMsg cmd
|
Cmd.map fromPageMsg cmd
|
||||||
|
|
||||||
|
SetField info ->
|
||||||
|
helpers.setField info
|
||||||
|
|
||||||
Batch list ->
|
Batch list ->
|
||||||
Cmd.batch (List.map (perform helpers) list)
|
Cmd.batch (List.map (perform helpers) list)
|
||||||
|
|
||||||
|
@ -615,9 +615,6 @@ config =
|
|||||||
}
|
}
|
||||||
|
|
||||||
onActionData actionData =
|
onActionData actionData =
|
||||||
let
|
|
||||||
_ = Debug.log "onActionData" actionData
|
|
||||||
in
|
|
||||||
case actionData of
|
case actionData of
|
||||||
${templates
|
${templates
|
||||||
.map(
|
.map(
|
||||||
|
@ -93,7 +93,7 @@ update eventObject pageFormState =
|
|||||||
-- pageFormState
|
-- pageFormState
|
||||||
--
|
--
|
||||||
--else
|
--else
|
||||||
case eventObject |> Decode.decodeValue fieldEventDecoder |> Debug.log "fieldEvent" of
|
case eventObject |> Decode.decodeValue fieldEventDecoder of
|
||||||
Ok fieldEvent ->
|
Ok fieldEvent ->
|
||||||
pageFormState
|
pageFormState
|
||||||
|> Dict.update fieldEvent.formId
|
|> Dict.update fieldEvent.formId
|
||||||
|
@ -835,8 +835,17 @@ startFetcher options model =
|
|||||||
|> Just
|
|> Just
|
||||||
|> Ok
|
|> Ok
|
||||||
|
|
||||||
_ ->
|
Http.BadUrl_ string ->
|
||||||
Debug.todo ""
|
Err <| Http.BadUrl string
|
||||||
|
|
||||||
|
Http.Timeout_ ->
|
||||||
|
Err <| Http.Timeout
|
||||||
|
|
||||||
|
Http.NetworkError_ ->
|
||||||
|
Err <| Http.NetworkError
|
||||||
|
|
||||||
|
Http.BadStatus_ metadata body ->
|
||||||
|
Err <| Http.BadStatus metadata.statusCode
|
||||||
)
|
)
|
||||||
, tracker = Nothing
|
, tracker = Nothing
|
||||||
, body = Http.stringBody "application/x-www-form-urlencoded" encodedBody
|
, body = Http.stringBody "application/x-www-form-urlencoded" encodedBody
|
||||||
@ -867,10 +876,17 @@ startFetcher2 formData model =
|
|||||||
-- TODO maybe have an optional way to pass the bytes through?
|
-- TODO maybe have an optional way to pass the bytes through?
|
||||||
Ok Nothing
|
Ok Nothing
|
||||||
|
|
||||||
_ ->
|
Http.BadUrl_ string ->
|
||||||
-- TODO where should errors go in application state? Should there be an onError where you can receive application-managed error events that are owned by
|
Err <| Http.BadUrl string
|
||||||
-- the Platform Model/Msg's?
|
|
||||||
Debug.todo ""
|
Http.Timeout_ ->
|
||||||
|
Err <| Http.Timeout
|
||||||
|
|
||||||
|
Http.NetworkError_ ->
|
||||||
|
Err <| Http.NetworkError
|
||||||
|
|
||||||
|
Http.BadStatus_ metadata body ->
|
||||||
|
Err <| Http.BadStatus metadata.statusCode
|
||||||
)
|
)
|
||||||
, tracker = Nothing
|
, tracker = Nothing
|
||||||
|
|
||||||
|
@ -647,7 +647,6 @@ nextStepToEffect site config model ( updatedStaticResponsesModel, nextStep ) =
|
|||||||
config.sharedData
|
config.sharedData
|
||||||
model.allRawResponses
|
model.allRawResponses
|
||||||
|> Result.mapError (StaticHttpRequest.toBuildError "")
|
|> Result.mapError (StaticHttpRequest.toBuildError "")
|
||||||
|> Debug.log "@@@sharedData"
|
|
||||||
|
|
||||||
apiResponse : Effect
|
apiResponse : Effect
|
||||||
apiResponse =
|
apiResponse =
|
||||||
@ -772,7 +771,6 @@ sendSinglePageProgress site contentJson config model info =
|
|||||||
case includeHtml of
|
case includeHtml of
|
||||||
RenderRequest.OnlyJson ->
|
RenderRequest.OnlyJson ->
|
||||||
pageDataResult
|
pageDataResult
|
||||||
|> Debug.log "pageDataResult"
|
|
||||||
|> Result.map
|
|> Result.map
|
||||||
(\okPageData ->
|
(\okPageData ->
|
||||||
case okPageData of
|
case okPageData of
|
||||||
@ -896,7 +894,6 @@ sendSinglePageProgress site contentJson config model info =
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
--Debug.todo ""
|
|
||||||
currentUrl : Url
|
currentUrl : Url
|
||||||
currentUrl =
|
currentUrl =
|
||||||
{ protocol = Url.Https
|
{ protocol = Url.Https
|
||||||
|
Loading…
Reference in New Issue
Block a user