Fix follower count setting.
This commit is contained in:
parent
5c8f07f0a8
commit
b396dba425
2 changed files with 13 additions and 3 deletions
|
|
@ -32,4 +32,12 @@ defmodule Pleroma.User.Info do
|
|||
|> cast(params, [:note_count])
|
||||
|> validate_required([:note_count])
|
||||
end
|
||||
|
||||
def set_follower_count(info, number) do
|
||||
params = %{follower_count: Enum.max([0, number])}
|
||||
|
||||
info
|
||||
|> cast(params, [:follower_count])
|
||||
|> validate_required([:follower_count])
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue