projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'default-pictures' into 'develop'
[akkoma]
/
lib
/
pleroma
/
web
/
mastodon_api
/
mastodon_api_controller.ex
diff --git
a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
index 6ca7a6076c56f9062bfb3e06d570c835e771dd53..0615ac11a0ec26080f7396f3842d2352d6d64375 100644
(file)
--- a/
lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
+++ b/
lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
@@
-93,8
+93,6
@@
defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
@instance Application.get_env(:pleroma, :instance)
def masto_instance(conn, _params) do
@instance Application.get_env(:pleroma, :instance)
def masto_instance(conn, _params) do
- user_count = Repo.aggregate(User.local_user_query, :count, :id)
- %{domain_count: domain_count, status_count: status_count} = Stats.get()
response = %{
uri: Web.base_url,
title: Keyword.get(@instance, :name),
response = %{
uri: Web.base_url,
title: Keyword.get(@instance, :name),
@@
-104,11
+102,7
@@
defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
urls: %{
streaming_api: String.replace(Web.base_url, ["http","https"], "wss")
},
urls: %{
streaming_api: String.replace(Web.base_url, ["http","https"], "wss")
},
- stats: %{
- status_count: status_count,
- user_count: user_count,
- domain_count: domain_count
- },
+ stats: Stats.get_stats,
max_toot_chars: Keyword.get(@instance, :limit)
}
max_toot_chars: Keyword.get(@instance, :limit)
}
@@
-116,8
+110,7
@@
defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
end
def peers(conn, _params) do
end
def peers(conn, _params) do
- %{peers: peers} = Stats.get()
- json(conn, peers)
+ json(conn, Stats.get_peers)
end
defp mastodonized_emoji do
end
defp mastodonized_emoji do