mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
feat: tankopedia website
This commit is contained in:
1 parent
818ee1d447
commit
f3144be382
7 files changed
+77
-13
No files matched your search
@@ -1,12 +1,12 @@
|
||||
import { go } from 'fuzzysort';
|
||||
import { TANKS, tankopedia } from '../blitzkrieg/tankopedia';
|
||||
import { tankopedia, tanks } from '../blitzkrieg/tankopedia';
|
||||
import { UserError } from '../blitzkrieg/userError';
|
||||
|
||||
export default async function resolveTankId(tank: string | number) {
|
||||
const number = typeof tank === 'string' ? parseInt(tank) : tank;
|
||||
|
||||
if (Number.isNaN(number)) {
|
||||
const searchResult = go(`${tank}`, await TANKS, {
|
||||
const searchResult = go(`${tank}`, await tanks, {
|
||||
keys: ['name'],
|
||||
limit: 1,
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user