From 461eb1a54c30ed6e0f4e05c36912d056fe777174 Mon Sep 17 00:00:00 2001 From: Jordan Bracco Date: Sat, 28 Sep 2024 16:21:53 +0200 Subject: remove gpt/image plugins --- lib/web/controllers/gpt_controller.ex | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 lib/web/controllers/gpt_controller.ex (limited to 'lib/web/controllers') 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 -- cgit v1.2.3