I’m creating a trello clone and my delete is not working

hey guys, I’m creating a trello clone and my delete is not working and I not sure why:

def delete_board(%Board{} = board) do
    Repo.delete(board)
  end
def delete_board(delete) do
  url = "/api/boards/:id"
  {:ok, %{status: status, body: body}} = Tesla.delete(client, url)
  Enum.map(body, fn x -> from_response(x) end)
end

thanks everyone for your help

Hey @Luiz_98. Any time you ask a troubleshooting question, it’s critical to explain what you mean by “is not working”. Do you get an error? If so, can you copy and paste the error here?

6 Likes

In that line, where is the client parameter defined? In the function signature the single parameter is called delete but this variable does not seem to be used in the function body.