Update actor_controller.ex
This commit is contained in:
parent
6ed5abc17d
commit
0c2777eb12
1 changed files with 4 additions and 3 deletions
|
@ -2,6 +2,7 @@ defmodule NullaWeb.ActorController do
|
|||
use NullaWeb, :controller
|
||||
alias Nulla.ActivityPub
|
||||
alias Nulla.Models.Actor
|
||||
alias Nulla.Models.Relation
|
||||
alias Nulla.Models.Note
|
||||
alias Nulla.Models.InstanceSettings
|
||||
|
||||
|
@ -22,17 +23,17 @@ defmodule NullaWeb.ActorController do
|
|||
|> put_resp_content_type("application/activity+json")
|
||||
|> send_resp(200, Jason.encode!(ActivityPub.actor(actor)))
|
||||
else
|
||||
following = Relation.count_following(actor.id)
|
||||
followers = Relation.count_followers(actor.id)
|
||||
notes = Note.get_latest_notes(actor.id)
|
||||
following = 0
|
||||
followers = 0
|
||||
|
||||
render(
|
||||
conn,
|
||||
:show,
|
||||
actor: actor,
|
||||
notes: notes,
|
||||
following: following,
|
||||
followers: followers,
|
||||
notes: notes,
|
||||
layout: false
|
||||
)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue