Update nodeinfo

This commit is contained in:
Mirai Kumiko 2025-06-14 18:50:54 +02:00
parent fd15cc089b
commit 49ac2bbe6f
Signed by: miraikumiko
GPG key ID: 3F178B1B5E0CB278
3 changed files with 40 additions and 7 deletions

View file

@ -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!()