Rename search.ex to database_search.ex and add search/2
[akkoma] / lib / pleroma / web / mastodon_api / controllers / search_controller.ex
index aaf52cdc597bb523dff377a5096a6bb2eac5a4f9..05fa4144d432ad0e99fbedc77ac233678a9adbcc 100644 (file)
@@ -76,9 +76,7 @@ defmodule Pleroma.Web.MastodonAPI.SearchController do
   end
 
   defp resource_search(_, "statuses", query, options) do
-    search_module = Pleroma.Config.get([Pleroma.Search, :module], Pleroma.Activity)
-
-    statuses = with_fallback(fn -> search_module.search(options[:for_user], query, options) end)
+    statuses = with_fallback(fn -> Pleroma.Search.DatabaseSearch.search(query, options) end)
 
     StatusView.render("index.json",
       activities: statuses,