Fakultas Ilmu Komputer UI

Commit cc9f8c84 authored by Muhammad Rafif Elfazri's avatar Muhammad Rafif Elfazri
Browse files

Add resctriction email should'nt be updated

parent f632f4e0
......@@ -31,8 +31,8 @@ defmodule DiskuyWeb.UserController do
def update(conn, %{"id" => id, "user" => user_params}) do
user = Account.get_user!(id)
with {:ok, %User{} = user} <- Account.update_user(user, user_params) do
new_user_params = Map.drop(user_params, ["email"])
with {:ok, %User{} = user} <- Account.update_user(user, new_user_params) do
render(conn, "show.json", user: user)
end
end
......
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