mirror of
https://github.com/tcgdex/cards-database.git
synced 2025-04-22 10:52:10 +00:00
fix: Make /series/:serie case insensitive (#164)
Signed-off-by: Avior <github@avior.me>
This commit is contained in:
parent
a8c1188e5f
commit
5ef66aac3b
@ -43,6 +43,9 @@ export default class Serie implements LocalSerie {
|
||||
const res = (require(`../../../generated/${lang}/series.json`) as Array<SDKSerie>)
|
||||
.find((c) => {
|
||||
return objectLoop(params, (it, key) => {
|
||||
if (typeof it === 'string') {
|
||||
return c[key as 'id'].toLowerCase().includes(it.toLowerCase())
|
||||
}
|
||||
return c[key as 'id'].includes(it)
|
||||
})
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user