mix format

This commit is contained in:
Mirai Kumiko 2025-06-08 10:58:48 +02:00
parent 7d8cb33405
commit 4fb1e200f1
Signed by: miraikumiko
GPG key ID: 3F178B1B5E0CB278
12 changed files with 221 additions and 69 deletions

View 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