Poll View: Always return voters_count
.
This commit is contained in:
parent
ba3f3a5a56
commit
1cfc3278c0
2 changed files with 2 additions and 2 deletions
|
@ -19,7 +19,7 @@ defmodule Pleroma.Web.MastodonAPI.PollView do
|
||||||
expired: expired,
|
expired: expired,
|
||||||
multiple: multiple,
|
multiple: multiple,
|
||||||
votes_count: votes_count,
|
votes_count: votes_count,
|
||||||
voters_count: (multiple || nil) && voters_count(object),
|
voters_count: voters_count(object),
|
||||||
options: options,
|
options: options,
|
||||||
voted: voted?(params),
|
voted: voted?(params),
|
||||||
emojis: Pleroma.Web.MastodonAPI.StatusView.build_emojis(object.data["emoji"])
|
emojis: Pleroma.Web.MastodonAPI.StatusView.build_emojis(object.data["emoji"])
|
||||||
|
|
|
@ -44,7 +44,7 @@ defmodule Pleroma.Web.MastodonAPI.PollViewTest do
|
||||||
],
|
],
|
||||||
voted: false,
|
voted: false,
|
||||||
votes_count: 0,
|
votes_count: 0,
|
||||||
voters_count: nil
|
voters_count: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
result = PollView.render("show.json", %{object: object})
|
result = PollView.render("show.json", %{object: object})
|
||||||
|
|
Loading…
Reference in a new issue