Verified Commit f4806248 authored by Haelwenn's avatar Haelwenn
Browse files

Add get endpoints for rights [AdminAPI]

parent 59ce7fed
......@@ -56,6 +56,13 @@ def right_add(conn, %{"right" => right, "nickname" => nickname})
|> json(
def right_get(conn, %{"nickname" => nickname}) do
user = User.get_by_nickname(nickname)
|> json(
def right_add(conn, _) do
|> put_status(404)
......@@ -99,8 +99,10 @@ defmodule Pleroma.Web.Router do
delete("/user", AdminAPIController, :user_delete)
post("/user", AdminAPIController, :user_create)
post("/rights/:right/:nickname", AdminAPIController, :right_add)
delete("/rights/:right/:nickname", AdminAPIController, :right_delete)
get("/rights/:nickname", AdminAPIController, :right_get)
get("/rights/:nickname/:right", AdminAPIController, :right_get)
post("/rights/:nickname/:right", AdminAPIController, :right_add)
delete("/rights/:nickname/:right", AdminAPIController, :right_delete)
post("/relay", AdminAPIController, :relay_follow)
delete("/relay", AdminAPIController, :relay_unfollow)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment