Update
This commit is contained in:
parent
188bc08494
commit
4af88f3e1d
44 changed files with 1041 additions and 34 deletions
21
lib/nulla_web/controllers/activitypub/activity_json.ex
Normal file
21
lib/nulla_web/controllers/activitypub/activity_json.ex
Normal file
|
@ -0,0 +1,21 @@
|
|||
defmodule NullaWeb.ActivityPub.ActivityJSON do
|
||||
alias Nulla.Activities.Activity
|
||||
|
||||
@doc """
|
||||
Renders a single activity.
|
||||
"""
|
||||
def show(activity) do
|
||||
data(activity)
|
||||
end
|
||||
|
||||
defp data(%Activity{} = activity) do
|
||||
Jason.OrderedObject.new(
|
||||
id: activity.ap_id,
|
||||
type: activity.type,
|
||||
actor: activity.actor,
|
||||
object: activity.object,
|
||||
to: activity.to,
|
||||
cc: activity.cc
|
||||
)
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue