mirror of
https://gitea.invidious.io/iv-org/invidious.git
synced 2024-08-15 00:53:41 +00:00
don't error when a channel doesn't have any community posts
This commit is contained in:
parent
e319c35f09
commit
8918ebf9b2
1 changed files with 11 additions and 0 deletions
|
@ -57,6 +57,17 @@ def extract_channel_community(items, *, ucid, locale, format, thin_mode, is_sing
|
|||
.try &.as_s || ""
|
||||
if error_message == "This channel does not exist."
|
||||
raise NotFoundException.new(error_message)
|
||||
elsif error_message == "This channel hasn't posted yet"
|
||||
response = JSON.build do |json|
|
||||
json.object do
|
||||
json.field "authorId", ucid
|
||||
json.field "comments" do
|
||||
json.array do
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return response
|
||||
else
|
||||
raise InfoException.new(error_message)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue