From a7b1a58449642426ee949909fb13ec82ca6084d3 Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Wed, 1 Apr 2026 00:01:32 -0600 Subject: [PATCH] feat: add TopViewedItem type and top_viewed to TaskStatsOut --- src/utils/type.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/utils/type.ts b/src/utils/type.ts index f648169..0dd3a1f 100644 --- a/src/utils/type.ts +++ b/src/utils/type.ts @@ -134,6 +134,13 @@ export interface FlagStats { yellow: number } +export interface TopViewedItem { + username: string + classname: string + view_count: number + submission_id: string +} + export interface TaskStatsOut { submitted_count: number unsubmitted_count: number @@ -145,4 +152,5 @@ export interface TaskStatsOut { score_distribution: ScoreBucket flag_stats: FlagStats classes: string[] + top_viewed: TopViewedItem[] }