   end
 
   def show(conn, %{"id" => id}) do
-    event = Event.get_event(id)
+    event = Shiftplaner.get_event(id)
     render(conn, "show.html", event: event)
   end
 
   def edit(conn, %{"id" => id}) do
-    event = Event.get_event!(id)
-    changeset = Event.change_event(event)
+    event = Shiftplaner.get_event(id)
+    changeset = Shiftplaner.change_event(event)
     render(conn, "edit.html", event: event, changeset: changeset)
   end
 
   def update(conn, %{"id" => id, "event" => event_params}) do
-    event = Event.get_event!(id)
+    event = Shiftplaner.get_event(id)
 
-    case Event.update_event(event, event_params) do
+    case Shiftplaner.update_event(event, event_params) do
       {:ok, event} ->
         conn
         |> put_flash(:info, "Event updated successfully.")

  end

  def delete(conn, %{"id" => id}) do
    event = Event.get_event(id)
    {:ok, _event} = Event.delete_event(event)

    conn
    |> put_flash(:info, "Event deleted successfully.")

defmodule ShiftplanerWebWeb.EventController do
  alias Shiftplaner.Event
  use ShiftplanerWebWeb, :controller

  def index(conn, _params) do
    events = Shiftplaner.list_all_events()
    render(conn, "index.html", events: events)
  end

  def new(conn, _params) do
    changeset = Shiftplaner.change_event(%Event{})
    render(conn, "new.html", changeset: changeset)
  end

  def create(conn, %{"event" => event_params}) do
    case Shiftplaner.create_event(event_params) do
      {:ok, event} ->
        conn
        |> put_flash(:info, "Event created successfully.")
