File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,15 +54,15 @@ let init api (user: UserData) =
5454
5555 model, cmd
5656
57- let update booksApi msg model =
57+ let update api msg model =
5858 match msg with
5959 | GotLastRestTime time -> { model with LastResetTime = time }, Cmd.none
6060 | GotWishlist wishlist -> { model with Wishlist = wishlist }, Cmd.none
6161 | RemoveBook title ->
6262 let userName = model.Wishlist.UserName
6363
6464 let cmd =
65- Cmd.OfAsync.either booksApi .removeBook ( userName, title) RemovedBook UnhandledError
65+ Cmd.OfAsync.either api .removeBook ( userName, title) RemovedBook UnhandledError
6666
6767 model, cmd
6868 | RemovedBook title ->
@@ -81,7 +81,7 @@ let update booksApi msg model =
8181 match model.Wishlist.VerifyNewBookIsNotADuplicate book with
8282 | Ok _ ->
8383 let userName = model.Wishlist.UserName
84- model, Cmd.OfAsync.either booksApi .addBook ( userName, book) AddedBook UnhandledError
84+ model, Cmd.OfAsync.either api .addBook ( userName, book) AddedBook UnhandledError
8585 | Error error -> model, Exception( error) |> UnhandledError |> Cmd.ofMsg
8686 | NewBook.Cancel, _ -> { model with NewBook = None }, Cmd.none
8787 | _, Some newBook ->
You can’t perform that action at this time.
0 commit comments