remove number_of_pets

This commit is contained in:
CJ_Clippy 2025-01-16 13:09:39 -08:00
parent 43ebe15745
commit 86960c2709
1 changed files with 2 additions and 3 deletions

View File

@ -6,7 +6,6 @@ defmodule Bright.User do
schema "users" do schema "users" do
field :name, :string field :name, :string
field :email, :string field :email, :string
field :number_of_pets, :integer
field :is_admin, :boolean field :is_admin, :boolean
field :auth_token, :string field :auth_token, :string
field :auth_token_expires_at, :utc_datetime field :auth_token_expires_at, :utc_datetime
@ -21,8 +20,8 @@ defmodule Bright.User do
@doc false @doc false
def changeset(user, attrs) do def changeset(user, attrs) do
user user
|> cast(attrs, [:name, :email, :bio, :number_of_pets, :is_admin]) |> cast(attrs, [:name, :email, :bio, :is_admin])
|> validate_required([:name, :email, :bio, :number_of_pets]) |> validate_required([:name, :email, :bio])
end end