feat: tankopedia website

This commit is contained in:
TrèsAbhi committed 2023-11-30 12:21:20 -06:00
1 parent 818ee1d447
commit f3144be382
7 files changed
+77 -13

No files matched your search

+2 -2
View File
@@ -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,
});