Fix masto api user updating.

This commit is contained in:
lain 2018-12-01 10:40:01 +01:00
commit 347df6421d
4 changed files with 66 additions and 59 deletions

View file

@ -112,10 +112,9 @@ defmodule Pleroma.User do
end
end
# TODO: Check if this still used
def update_changeset(struct, params \\ %{}) do
struct
|> cast(params, [:bio, :name])
|> cast(params, [:bio, :name, :avatar])
|> unique_constraint(:nickname)
|> validate_format(:nickname, ~r/^[a-zA-Z\d]+$/)
|> validate_length(:bio, max: 5000)