Fix bug in category endpoint & stats command
This commit is contained in:
parent
f84eef5e5f
commit
fa36795dde
@ -76,7 +76,7 @@ module YiffRest
|
||||
render(json: {
|
||||
success: true,
|
||||
data: {
|
||||
**APIImage.categories.find { |c| c[:db] == category },
|
||||
**APIImage.categories.find { |c| c.db == category },
|
||||
count: count,
|
||||
},
|
||||
})
|
||||
|
@ -325,7 +325,7 @@ class APIKey < ApplicationRecord
|
||||
include WebhookMethods
|
||||
|
||||
def self.stats(ip: nil, key: nil)
|
||||
categories = APIImage.categories.pluck(:db)
|
||||
categories = APIImage.categories.map(&:db)
|
||||
|
||||
keys = [
|
||||
"yiffy2:stats:images:total",
|
||||
|
Loading…
Reference in New Issue
Block a user