Add missing interactions to reverse page

This commit is contained in:
Liam 2024-08-28 18:10:19 -04:00
parent 073ca2881b
commit 2c60f9d662

View file

@ -3,6 +3,7 @@ defmodule PhilomenaWeb.Search.ReverseController do
alias Philomena.DuplicateReports.SearchQuery alias Philomena.DuplicateReports.SearchQuery
alias Philomena.DuplicateReports alias Philomena.DuplicateReports
alias Philomena.Interactions
plug PhilomenaWeb.ScraperCachePlug plug PhilomenaWeb.ScraperCachePlug
plug PhilomenaWeb.ScraperPlug, params_key: "image", params_name: "image" plug PhilomenaWeb.ScraperPlug, params_key: "image", params_name: "image"
@ -16,12 +17,14 @@ defmodule PhilomenaWeb.Search.ReverseController do
case DuplicateReports.execute_search_query(image_params) do case DuplicateReports.execute_search_query(image_params) do
{:ok, images} -> {:ok, images} ->
changeset = DuplicateReports.change_search_query(%SearchQuery{}) changeset = DuplicateReports.change_search_query(%SearchQuery{})
interactions = Interactions.user_interactions(images, conn.assigns.current_user)
render(conn, "index.html", render(conn, "index.html",
title: "Reverse Search", title: "Reverse Search",
layout_class: "layout--wide", layout_class: "layout--wide",
images: images, images: images,
changeset: changeset changeset: changeset,
interactions: interactions
) )
{:error, changeset} -> {:error, changeset} ->