Fakultas Ilmu Komputer UI

Commit 2863f601 authored by Muhammad Rafif Elfazri's avatar Muhammad Rafif Elfazri
Browse files

Unallowed API to update role

parent c103940d
......@@ -36,7 +36,7 @@ defmodule DiskuyWeb.UserController do
def update(conn, %{"user" => user_params}) do
user = Guardian.Plug.current_resource(conn)
new_user_params = user_params |> Map.drop(["email", "id"])
new_user_params = user_params |> Map.drop(["email", "id", "role"])
with {:ok, %User{} = user} <- Account.update_user(user, new_user_params) do
render(conn, "show.json", user: user)
end
......
Markdown is supported
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