1
0
Fork 0
forked from mirrors/akkoma

admin_api_controller.ex: fix remaining params at once

This commit is contained in:
Haelwenn (lanodan) Monnier 2018-10-12 06:43:08 +02:00
parent 95b107b6cc
commit c5a2bd6a65
No known key found for this signature in database
GPG key ID: D5B7A8E43C997DEE

View file

@ -7,7 +7,7 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIController do
action_fallback(:errors)
def user_delete(conn, %{nickname: nickname}) do
def user_delete(conn, %{"nickname" => nickname}) do
user = User.get_by_nickname(nickname)
if user[:local] == true do
@ -22,7 +22,7 @@ def user_delete(conn, %{nickname: nickname}) do
def user_create(
conn,
%{user: %{nickname: nickname, email: email, password: password} = user}
%{user: %{"nickname" => nickname, "email" => email, "password" => password} = user}
) do
new_user = %User{
nickname: nickname,
@ -41,14 +41,14 @@ def user_create(
|> send(200)
end
def relay_follow(conn, %{relay_url: target}) do
def relay_follow(conn, %{"relay_url" => target}) do
:ok = Relay.follow(target)
conn
|> send(200)
end
def relay_unfollow(conn, %{relay_url: target}) do
def relay_unfollow(conn, %{"relay_url" => target}) do
:ok = Relay.unfollow(target)
conn