mix format
This commit is contained in:
parent
7d8cb33405
commit
4fb1e200f1
12 changed files with 221 additions and 69 deletions
25
lib/nulla_web/controllers/inbox_controller.ex
Normal file
25
lib/nulla_web/controllers/inbox_controller.ex
Normal file
|
@ -0,0 +1,25 @@
|
|||
defmodule NullaWeb.InboxController do
|
||||
use NullaWeb, :controller
|
||||
|
||||
def receive(conn, %{"type" => "Follow"} = activity) do
|
||||
# Check signature
|
||||
# Verify actor and object
|
||||
# Save follow to db
|
||||
# Send Accept or Reject
|
||||
json(conn, %{"status" => "Follow received"})
|
||||
end
|
||||
|
||||
def receive(conn, %{"type" => "Like"} = activity) do
|
||||
# Process Like
|
||||
json(conn, %{"status" => "Like received"})
|
||||
end
|
||||
|
||||
def receive(conn, %{"type" => "Create"} = activity) do
|
||||
# Create object and save
|
||||
json(conn, %{"status" => "Object created"})
|
||||
end
|
||||
|
||||
def receive(conn, _params) do
|
||||
json(conn, %{"status" => "Unhandled type"})
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue