Skip to content

Commit 83b0e93

Browse files
committed
refactor: remove unused screenshot test function and add admins_last_active query
1 parent 3f51b32 commit 83b0e93

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

lib/algora/admin/admin.ex

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,6 @@ defmodule Algora.Admin do
1616

1717
require Logger
1818

19-
@opts [type: "png", width: 1200, height: 630, scale_factor: 1]
20-
21-
def test(path) do
22-
dir = Path.join([System.tmp_dir!(), "og"] ++ path)
23-
File.mkdir_p!(dir)
24-
filepath = Path.join(dir, "og.png")
25-
url = "#{AlgoraWeb.Endpoint.url()}/#{path}?screenshot"
26-
Algora.ScreenshotQueue.generate_image(url, Keyword.put(@opts, :path, filepath))
27-
end
28-
2919
def alert(message) do
3020
email_job =
3121
Algora.Activities.SendEmail.changeset(%{

lib/algora_web/controllers/og_image_controller.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ defmodule AlgoraWeb.OGImageController do
7171
conn |> put_status(:not_found) |> text("Not found")
7272
end
7373

74-
def take_and_upload_screenshot(path) do
74+
defp take_and_upload_screenshot(path) do
7575
dir = Path.join([System.tmp_dir!(), "og"] ++ path)
7676
File.mkdir_p!(dir)
7777
filepath = Path.join(dir, "og.png")

0 commit comments

Comments
 (0)