summaryrefslogtreecommitdiff
path: root/lib/web/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'lib/web/controllers')
-rw-r--r--lib/web/controllers/gpt_controller.ex33
1 files changed, 0 insertions, 33 deletions
diff --git a/lib/web/controllers/gpt_controller.ex b/lib/web/controllers/gpt_controller.ex
deleted file mode 100644
index 810a875..0000000
--- a/lib/web/controllers/gpt_controller.ex
+++ /dev/null
@@ -1,33 +0,0 @@
-defmodule NolaWeb.GptController do
- use NolaWeb, :controller
- require Logger
-
- plug NolaWeb.ContextPlug
-
- def result(conn, params = %{"id" => result_id}) do
- case Nola.Plugins.Gpt.get_result(result_id) do
- {:ok, result} ->
- network = Map.get(params, "network")
- channel = if c = Map.get(params, "chan"), do: NolaWeb.reformat_chan(c)
- render(conn, "result.html", network: network, channel: channel, result: result)
- {:error, :not_found} ->
- conn
- |> put_status(404)
- |> text("Page not found")
- end
- end
-
- def prompt(conn, params = %{"id" => prompt_id}) do
- case Nola.Plugins.Gpt.get_prompt(prompt_id) do
- {:ok, prompt} ->
- network = Map.get(params, "network")
- channel = if c = Map.get(params, "chan"), do: NolaWeb.reformat_chan(c)
- render(conn, "prompt.html", network: network, channel: channel, prompt: prompt)
- {:error, :not_found} ->
- conn
- |> put_status(404)
- |> text("Page not found")
- end
- end
-
-end