elm-todo-rest-api
elm-todo-rest-api copied to clipboard
json-server casts int-like strings to int
If you create a todo like this:
POST /todos
{
"title": "1234",
…
}
The response will be:
{
"title": 1234,
…
}
This breaks the todoDecoder, which expects title
to be a string. Even more confusingly, the Result.Err
from FetchAllDone
and CreateDone
are discarded as well. Maybe consider reporting upstream and/or making a more type-friendly API.