Update nodeinfo
This commit is contained in:
parent
fd15cc089b
commit
49ac2bbe6f
3 changed files with 40 additions and 7 deletions
|
@ -14,11 +14,16 @@ defmodule NullaWeb.NodeinfoController do
|
|||
|
||||
def show(conn, _params) do
|
||||
version = Application.spec(:nulla, :vsn) |> to_string()
|
||||
instance_settings = InstanceSettings.get_instance_settings!()
|
||||
domain = instance_settings.domain
|
||||
total = User.get_total_users_count(domain)
|
||||
month = User.get_active_users_count(domain, 30)
|
||||
halfyear = User.get_active_users_count(domain, 180)
|
||||
|
||||
users = %{
|
||||
total: 0,
|
||||
month: 0,
|
||||
halfyear: 0
|
||||
total: total,
|
||||
month: month,
|
||||
halfyear: halfyear
|
||||
}
|
||||
|
||||
instance_settings = InstanceSettings.get_instance_settings!()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue