Skip to content

Commit

Permalink
Add missing interactions to reverse page
Browse files Browse the repository at this point in the history
  • Loading branch information
liamwhite committed Aug 28, 2024
1 parent 073ca28 commit 2c60f9d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/philomena_web/controllers/search/reverse_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ defmodule PhilomenaWeb.Search.ReverseController do

alias Philomena.DuplicateReports.SearchQuery
alias Philomena.DuplicateReports
alias Philomena.Interactions

plug PhilomenaWeb.ScraperCachePlug
plug PhilomenaWeb.ScraperPlug, params_key: "image", params_name: "image"
Expand All @@ -16,12 +17,14 @@ defmodule PhilomenaWeb.Search.ReverseController do
case DuplicateReports.execute_search_query(image_params) do
{:ok, images} ->
changeset = DuplicateReports.change_search_query(%SearchQuery{})
interactions = Interactions.user_interactions(images, conn.assigns.current_user)

render(conn, "index.html",
title: "Reverse Search",
layout_class: "layout--wide",
images: images,
changeset: changeset
changeset: changeset,
interactions: interactions
)

{:error, changeset} ->
Expand Down

0 comments on commit 2c60f9d

Please sign in to comment.