evroon/bracket

Discrepancies between API interface StageItemWithRounds and frontend's StageItemWithRounds

Closed this issue · 3 comments

The frontend defines StageItemWithRounds as

export interface StageItemWithRounds {
id: number;
tournament_id: number;
created: string;
type: string;
name: string;
type_name: string;
team_count: number;
is_active: boolean;
rounds: RoundInterface[];
inputs: StageItemInput[];
}

but the API defines it as
image

Note the discrepancies in fields ournament_id/stage_id and the additional field is_active. Is this correct? As I see that in

[activeStage] = getStageById(swrStagesResponse, stageItem.stage_id);

stage_id is utilized, but TypeScript complains that this property doesn't exist on the interface defined. So I'm opening this issue to confirm you meant stage_id and not tournament_id.

this bug would be addressed in #530

This issue is stale because it has been open for 60 days with no activity. What is the action to take here?

evroon commented

Thanks! I have fixed it now