From c5a2bd6a65686ab17878e0439c8b6c804abe6fbb Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Fri, 12 Oct 2018 06:43:08 +0200 Subject: [PATCH] admin_api_controller.ex: fix remaining params at once --- lib/pleroma/web/admin_api/admin_api_controller.ex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/pleroma/web/admin_api/admin_api_controller.ex b/lib/pleroma/web/admin_api/admin_api_controller.ex index 7ef60b1f4..70c1caaec 100644 --- a/lib/pleroma/web/admin_api/admin_api_controller.ex +++ b/lib/pleroma/web/admin_api/admin_api_controller.ex @@ -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 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIController 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 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIController do |> 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 -- 2.45.2