projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'fix-auto-link-for-profile-fields' into 'develop'
[akkoma]
/
lib
/
pleroma
/
web
/
mastodon_api
/
controllers
/
search_controller.ex
diff --git
a/lib/pleroma/web/mastodon_api/controllers/search_controller.ex
b/lib/pleroma/web/mastodon_api/controllers/search_controller.ex
index 0a929f55b9137aa87ff57fdbfab750a68cec7c59..fcab4ef63e22fa2c5e4944f18b94fd40bf46f727 100644
(file)
--- a/
lib/pleroma/web/mastodon_api/controllers/search_controller.ex
+++ b/
lib/pleroma/web/mastodon_api/controllers/search_controller.ex
@@
-1,5
+1,5
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-20
19
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-20
20
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.MastodonAPI.SearchController do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.MastodonAPI.SearchController do
@@
-43,7
+43,7
@@
defmodule Pleroma.Web.MastodonAPI.SearchController do
result =
default_values
|> Enum.map(fn {resource, default_value} ->
result =
default_values
|> Enum.map(fn {resource, default_value} ->
- if params["type"]
== nil or params["type"] == resource
do
+ if params["type"]
in [nil, resource]
do
{resource, fn -> resource_search(version, resource, query, options) end}
else
{resource, fn -> default_value end}
{resource, fn -> resource_search(version, resource, query, options) end}
else
{resource, fn -> default_value end}