From fe661a935ac887b11aec31ff049ace2db7ccbf84 Mon Sep 17 00:00:00 2001 From: Simponic Date: Mon, 19 Dec 2022 16:27:34 -0700 Subject: Add unsupported message for DSA keys, player and such --- lib/chessh/schema/player.ex | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'lib/chessh/schema/player.ex') 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 -- cgit v1.3