mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-28 13:09:51 +01:00
fix: remove api imports
This commit is contained in:
1 parent
636c54aa36
commit
25cfb7db74
2 files changed
+11
-11
No files matched your search
@@ -1,4 +1,8 @@
|
|||||||
import { tankDefinitions, usersDatabase } from '@blitzkit/core';
|
import { tankDefinitions, usersDatabase } from '@blitzkit/core';
|
||||||
|
import {
|
||||||
|
TANK_VOTE_CATEGORIES,
|
||||||
|
TankVoteCategory,
|
||||||
|
} from '@blitzkit/core/src/blitzkit/votes';
|
||||||
import { NextRequest, NextResponse } from 'next/server';
|
import { NextRequest, NextResponse } from 'next/server';
|
||||||
import { StarsInt } from '../../../../../../website/src/app/tools/tankopedia/[id]/components/Model/MetaSection/components/Stars';
|
import { StarsInt } from '../../../../../../website/src/app/tools/tankopedia/[id]/components/Model/MetaSection/components/Stars';
|
||||||
import { isValidBlitzId } from '../../../../../../website/src/core/blitz/isValidBlitzId';
|
import { isValidBlitzId } from '../../../../../../website/src/core/blitz/isValidBlitzId';
|
||||||
@@ -7,15 +11,6 @@ import {
|
|||||||
BlitzkitResponseError,
|
BlitzkitResponseError,
|
||||||
} from '../../../../../../website/src/hooks/useTankVotes';
|
} 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(
|
export async function GET(
|
||||||
request: NextRequest,
|
request: NextRequest,
|
||||||
{ params }: { params: { id: string } },
|
{ params }: { params: { id: string } },
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
import { TankVoteCategory } from '../../../api/src/app/tank-voting/[id]/cast/route';
|
|
||||||
|
|
||||||
export interface TankVotes {
|
export interface TankVotes {
|
||||||
categories: Record<TankVoteCategory, number | null>;
|
categories: Record<TankVoteCategory, number | null>;
|
||||||
votes: number;
|
votes: number;
|
||||||
last_updated?: number;
|
last_updated?: number;
|
||||||
}
|
}
|
||||||
|
export const TANK_VOTE_CATEGORIES = [
|
||||||
|
'easiness',
|
||||||
|
'firepower',
|
||||||
|
'maneuverability',
|
||||||
|
'survivability',
|
||||||
|
];
|
||||||
|
export type TankVoteCategory = (typeof TANK_VOTE_CATEGORIES)[number];
|
||||||
Reference in new issue
Block a user