diff options
| author | Simponic <loganhunt@simponic.xyz> | 2022-12-19 16:27:34 -0700 |
|---|---|---|
| committer | Simponic <loganhunt@simponic.xyz> | 2022-12-19 16:27:34 -0700 |
| commit | fe661a935ac887b11aec31ff049ace2db7ccbf84 (patch) | |
| tree | 13fdbe8757d929671f7006c20181a4b8febc83ce /lib/chessh/schema/player.ex | |
| parent | b4743f9efb685545cdd780cc9ba7a50e083dd8cf (diff) | |
| download | chessh-fe661a935ac887b11aec31ff049ace2db7ccbf84.tar.gz chessh-fe661a935ac887b11aec31ff049ace2db7ccbf84.zip | |
Add unsupported message for DSA keys, player and such
Diffstat (limited to 'lib/chessh/schema/player.ex')
| -rw-r--r-- | lib/chessh/schema/player.ex | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/chessh/schema/player.ex b/lib/chessh/schema/player.ex index 7d9bb6e..d04ed3e 100644 --- a/lib/chessh/schema/player.ex +++ b/lib/chessh/schema/player.ex @@ -9,6 +9,8 @@ defmodule Chessh.Player do field(:password, :string, virtual: true) field(:hashed_password, :string) + has_many(:keys, Chessh.Key) + timestamps() end @@ -52,7 +54,6 @@ defmodule Chessh.Player do message: "only letters, numbers, underscores, and hyphens allowed" ) |> unique_constraint(:username) - |> lowercase(:username) end defp validate_password(changeset, opts) do @@ -74,8 +75,4 @@ defmodule Chessh.Player do changeset end end - - defp lowercase(changeset, field) do - Map.update!(changeset, field, &String.downcase/1) - end end |
