From 25cfb7db740f94897c94c3acbde65f04fe65413c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Sun, 8 Sep 2024 09:46:29 -0500 Subject: [PATCH] fix: remove api imports --- packages/api/src/app/tank-voting/[id]/cast/route.ts | 13 ++++--------- packages/core/src/blitzkit/votes.ts | 9 +++++++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/api/src/app/tank-voting/[id]/cast/route.ts b/packages/api/src/app/tank-voting/[id]/cast/route.ts index fe57b7e29..b104f96cf 100644 --- a/packages/api/src/app/tank-voting/[id]/cast/route.ts +++ b/packages/api/src/app/tank-voting/[id]/cast/route.ts @@ -1,4 +1,8 @@ import { tankDefinitions, usersDatabase } from '@blitzkit/core'; +import { + TANK_VOTE_CATEGORIES, + TankVoteCategory, +} from '@blitzkit/core/src/blitzkit/votes'; import { NextRequest, NextResponse } from 'next/server'; import { StarsInt } from '../../../../../../website/src/app/tools/tankopedia/[id]/components/Model/MetaSection/components/Stars'; import { isValidBlitzId } from '../../../../../../website/src/core/blitz/isValidBlitzId'; @@ -7,15 +11,6 @@ import { BlitzkitResponseError, } from '../../../../../../website/src/hooks/useTankVotes'; -export const TANK_VOTE_CATEGORIES = [ - 'easiness', - 'firepower', - 'maneuverability', - 'survivability', -]; - -export type TankVoteCategory = (typeof TANK_VOTE_CATEGORIES)[number]; - export async function GET( request: NextRequest, { params }: { params: { id: string } }, diff --git a/packages/core/src/blitzkit/votes.ts b/packages/core/src/blitzkit/votes.ts index 48ce62573..04c685ba5 100644 --- a/packages/core/src/blitzkit/votes.ts +++ b/packages/core/src/blitzkit/votes.ts @@ -1,7 +1,12 @@ -import { TankVoteCategory } from '../../../api/src/app/tank-voting/[id]/cast/route'; - export interface TankVotes { categories: Record; votes: number; last_updated?: number; } +export const TANK_VOTE_CATEGORIES = [ + 'easiness', + 'firepower', + 'maneuverability', + 'survivability', +]; +export type TankVoteCategory = (typeof TANK_VOTE_CATEGORIES)[number];