Simplify creation of empty json array

Co-Authored-By: Samantaz Fox <coding@samantaz.fr>
This commit is contained in:
ChunkyProgrammer 2024-02-15 19:51:35 -05:00
parent 008341d106
commit 9148a78f99

View file

@ -61,10 +61,7 @@ def extract_channel_community(items, *, ucid, locale, format, thin_mode, is_sing
response = JSON.build do |json|
json.object do
json.field "authorId", ucid
json.field "comments" do
json.array do
end
end
json.field "comments", json.array { }
end
end
return response