mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-20 06:37:59 +01:00
Add missing interactions to reverse page
This commit is contained in:
parent
073ca2881b
commit
2c60f9d662
1 changed files with 4 additions and 1 deletions
|
@ -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} ->
|
||||||
|
|
Loading…
Reference in a new issue