     alias Swoosh.Adapters.Local.Storage.Memory
 
     require EEx
-    EEx.function_from_file :defp, :template, "lib/plug/templates/mailbox_viewer/index.html.eex", [:assigns]
+
+    EEx.function_from_file(
+      :defp,
+      :template,
+      "lib/plug/templates/mailbox_viewer/index.html.eex",
+      [:assigns]
+    )
 
     def call(conn, opts) do
       conn =
         conn
         |> assign(:base_path, opts[:base_path] || "/")
         |> assign(:storage_driver, opts[:storage_driver] || Memory)
+
       super(conn, opts)
     end
 


    get "/:id/html" do
      email = conn.assigns.storage_driver.get(id)
      conn
      |> put_resp_content_type("text/html")
      |> send_resp(200, email.html_body)

              conn
              |> put_resp_content_type(content_type)
              |> send_resp(200, data)

            %{path: path, content_type: content_type} when not is_nil(path) ->
              conn
              |> put_resp_content_type(content_type)
              |> send_resp(200, File.read!(path))

            _ ->
              conn
              |> put_resp_content_type("text/html")
              |> send_resp(500, "Attachment cannot be displayed")
          end

        _ ->
          conn
          |> put_resp_content_type("text/html")
