This commit is contained in:
Mirai Kumiko 2025-06-30 14:03:57 +02:00
parent fa350aa551
commit c531beadb7
Signed by: miraikumiko
GPG key ID: 3F178B1B5E0CB278
11 changed files with 20 additions and 41 deletions

View file

@ -7,7 +7,7 @@ defmodule NullaWeb.FollowController do
def following(conn, %{"username" => username, "page" => page_param}) do
instance_settings = InstanceSettings.get_instance_settings!()
domain = instance_settings.domain
domain = NullaWeb.Endpoint.host()
limit = instance_settings.api_limit
actor = Actor.get_actor(preferredUsername: username, domain: domain)
total = Relation.count_following(actor.id)
@ -26,8 +26,7 @@ defmodule NullaWeb.FollowController do
end
def following(conn, %{"username" => username}) do
instance_settings = InstanceSettings.get_instance_settings!()
domain = instance_settings.domain
domain = NullaWeb.Endpoint.host()
actor = Actor.get_actor(preferredUsername: username, domain: domain)
total = Relation.count_following(actor.id)
@ -38,7 +37,7 @@ defmodule NullaWeb.FollowController do
def followers(conn, %{"username" => username, "page" => page_param}) do
instance_settings = InstanceSettings.get_instance_settings!()
domain = instance_settings.domain
domain = NullaWeb.Endpoint.host()
limit = instance_settings.api_limit
actor = Actor.get_actor(preferredUsername: username, domain: domain)
total = Relation.count_followers(actor.id)
@ -57,8 +56,7 @@ defmodule NullaWeb.FollowController do
end
def followers(conn, %{"username" => username}) do
instance_settings = InstanceSettings.get_instance_settings!()
domain = instance_settings.domain
domain = NullaWeb.Endpoint.host()
actor = Actor.get_actor(preferredUsername: username, domain: domain)
total = Relation.count_followers(actor.id)