mirror of
https://gitea.invidious.io/iv-org/invidious.git
synced 2024-08-15 00:53:41 +00:00
Fix 'to_json' for comment array
This commit is contained in:
parent
a1ad561b98
commit
a37692cce4
1 changed files with 5 additions and 1 deletions
|
@ -45,7 +45,11 @@ DEFAULT_USER_PREFERENCES = Preferences.from_json({
|
|||
class Preferences
|
||||
module StringToArray
|
||||
def self.to_json(value : Array(String), json : JSON::Builder)
|
||||
return value.to_json
|
||||
json.array do
|
||||
value.each do |element|
|
||||
json.string element
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def self.from_json(value : JSON::PullParser) : Array(String)
|
||||
|
|
Loading…
Reference in a new issue