Fix masto api user updating.
This commit is contained in:
parent
c443c9bd72
commit
347df6421d
4 changed files with 66 additions and 59 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue