mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 00:26:30 +00:00
admin_api_controller.ex: fix remaining params at once
This commit is contained in:
parent
95b107b6cc
commit
c5a2bd6a65
1 changed files with 4 additions and 4 deletions
|
@ -7,7 +7,7 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIController do
|
||||||
|
|
||||||
action_fallback(:errors)
|
action_fallback(:errors)
|
||||||
|
|
||||||
def user_delete(conn, %{nickname: nickname}) do
|
def user_delete(conn, %{"nickname" => nickname}) do
|
||||||
user = User.get_by_nickname(nickname)
|
user = User.get_by_nickname(nickname)
|
||||||
|
|
||||||
if user[:local] == true do
|
if user[:local] == true do
|
||||||
|
@ -22,7 +22,7 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIController do
|
||||||
|
|
||||||
def user_create(
|
def user_create(
|
||||||
conn,
|
conn,
|
||||||
%{user: %{nickname: nickname, email: email, password: password} = user}
|
%{user: %{"nickname" => nickname, "email" => email, "password" => password} = user}
|
||||||
) do
|
) do
|
||||||
new_user = %User{
|
new_user = %User{
|
||||||
nickname: nickname,
|
nickname: nickname,
|
||||||
|
@ -41,14 +41,14 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIController do
|
||||||
|> send(200)
|
|> send(200)
|
||||||
end
|
end
|
||||||
|
|
||||||
def relay_follow(conn, %{relay_url: target}) do
|
def relay_follow(conn, %{"relay_url" => target}) do
|
||||||
:ok = Relay.follow(target)
|
:ok = Relay.follow(target)
|
||||||
|
|
||||||
conn
|
conn
|
||||||
|> send(200)
|
|> send(200)
|
||||||
end
|
end
|
||||||
|
|
||||||
def relay_unfollow(conn, %{relay_url: target}) do
|
def relay_unfollow(conn, %{"relay_url" => target}) do
|
||||||
:ok = Relay.unfollow(target)
|
:ok = Relay.unfollow(target)
|
||||||
|
|
||||||
conn
|
conn
|
||||||
|
|
Loading…
Reference in a new issue