Correct syntax with mix format
This commit is contained in:
parent
9972678a68
commit
afe892ddac
|
@ -323,7 +323,7 @@ def increase_note_count(%User{} = user) do
|
|||
end
|
||||
|
||||
def decrease_note_count(%User{} = user) do
|
||||
note_count = (user.info["note_count"] || 0)
|
||||
note_count = user.info["note_count"] || 0
|
||||
note_count = if note_count <= 0, do: 0, else: note_count - 1
|
||||
new_info = Map.put(user.info, "note_count", note_count)
|
||||
|
||||
|
|
Loading…
Reference in a new issue