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
alias Philomena.Interactions
plug PhilomenaWeb.ScraperCachePlug
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
{: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} ->