 
   def handle_in("time_entry:update", %{"description" => _description} = params, socket) do
     time_entry = socket.assigns.time_entry
-    |> TimeEntry.changeset(params)
-    |> Repo.update!
+    |> TimeEntryActions.update(params)
 
     {:reply, {:ok, time_entry}, assign(socket, :time_entry, time_entry)}
+  end
+
+  def handle_in("time_entry:discard", %{"id" => _id}, socket) do
+    current_user = socket.assigns.current_user
+
+    time_entry = socket.assigns.time_entry
+    |> TimeEntryActions.discard
+
+    TimerMonitor.stop(current_user.id)
+
+    {:reply, {:ok, time_entry}, assign(socket, :time_entry, nil)}
   end
 
   # In case there's an existing time entry monitor running it


    TimerMonitor.stop(current_user.id)

    {:reply, {:ok, time_entry}, socket}
  end

  def handle_in("time_entry:restart",


  def handle_in("time_entry:stop",
  %{
    "id" => _id,
    "stopped_at" => stopped_at,
  }, socket) do
    current_user = socket.assigns.current_user
