mirror of
https://git.pleroma.social/sjw/pleroma.git
synced 2024-12-29 21:05:41 +01:00
Apply 1 suggestion(s) to 1 file(s)
This commit is contained in:
parent
00c4c6a382
commit
70522989d9
@ -28,10 +28,10 @@ defmodule Pleroma.Web.MastodonAPI.PollView do
|
||||
|
||||
def render("show.json", %{object: object} = params) do
|
||||
case object.data do
|
||||
%{"anyOf" => options} when is_list(options) and options != [] ->
|
||||
%{"anyOf" => [ _ | _] = options} ->
|
||||
render(__MODULE__, "show.json", Map.merge(params, %{multiple: true, options: options}))
|
||||
|
||||
%{"oneOf" => options} when is_list(options) and options != [] ->
|
||||
%{"oneOf" => [ _ | _] = options} ->
|
||||
render(__MODULE__, "show.json", Map.merge(params, %{multiple: false, options: options}))
|
||||
|
||||
_ ->
|
||||
|
Loading…
Reference in New Issue
Block a user