Current section
Files
Jump to
Current section
Files
lib/maat_feather_web/controllers/user_controller.ex
defmodule MaatFeatherWeb.UserController do
use MaatFeatherWeb, :controller
alias MaatFeather.Users
alias MaatFeather.Users.User
action_fallback MaatFeatherWeb.FallbackController
def create(conn, %{"user" => user_params}) do
with {:ok, %User{} = user} <- Users.create_user(user_params) do
conn
|> put_status(:created)
|> render("show.json", user: user)
end
end
end