Fix implicit hash conversion issue

This commit is contained in:
Donovan Daniels 2024-08-06 05:24:51 -05:00
parent 958b45de92
commit 0ca5f19509
Signed by: Donovan_DMC
GPG Key ID: 907D29CBFD6157BA
2 changed files with 3 additions and 1 deletions

View File

@ -76,7 +76,7 @@ module YiffRest
render(json: { render(json: {
success: true, success: true,
data: { data: {
**APIImage.categories.find { |c| c.db == category }, **APIImage.categories.find { |c| c.db == category }.to_h,
count: count, count: count,
}, },
}) })

View File

@ -61,4 +61,6 @@ class APICategory
count: count, count: count,
} }
end end
alias to_h as_json
end end