mirror of
https://github.com/tcgdex/cards-database.git
synced 2025-04-22 19:02: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>)
|
const res = (require(`../../../generated/${lang}/series.json`) as Array<SDKSerie>)
|
||||||
.find((c) => {
|
.find((c) => {
|
||||||
return objectLoop(params, (it, key) => {
|
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)
|
return c[key as 'id'].includes(it)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user