From 8e73d12a703e90ad908962143951178c13d0d6fe Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Fri, 20 Feb 2026 23:32:22 +0900
Subject: feat: add user submission history page

Allow users to view their own past submissions (code, size, status,
timestamp) for each game. Adds API endpoint, backend handler, SQL query,
and frontend page with expandable code display.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---
 backend/query.sql | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'backend/query.sql')

diff --git a/backend/query.sql b/backend/query.sql
index 45ac46f..c791c27 100644
--- a/backend/query.sql
+++ b/backend/query.sql
@@ -259,6 +259,11 @@ WHERE testcase_id = $1;
 DELETE FROM testcases
 WHERE testcase_id = $1;
 
+-- name: GetSubmissionsByGameIDAndUserID :many
+SELECT * FROM submissions
+WHERE game_id = $1 AND user_id = $2
+ORDER BY created_at DESC;
+
 -- name: GetSubmissionsByGameID :many
 SELECT *
 FROM submissions
-- 
cgit v1.3.1

