From 8e73d12a703e90ad908962143951178c13d0d6fe Mon Sep 17 00:00:00 2001 From: nsfisis 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 --- openapi/api-server.yaml | 64 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) (limited to 'openapi') diff --git a/openapi/api-server.yaml b/openapi/api-server.yaml index ed535d3..9749f25 100644 --- a/openapi/api-server.yaml +++ b/openapi/api-server.yaml @@ -153,6 +153,47 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + /games/{game_id}/play/submissions: + get: + operationId: getGamePlaySubmissions + parameters: + - name: game_id + in: path + required: true + schema: + type: integer + responses: + '200': + description: The request has succeeded. + content: + application/json: + schema: + type: object + properties: + submissions: + type: array + items: + $ref: '#/components/schemas/Submission' + required: + - submissions + '401': + description: Access is unauthorized. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Access is forbidden. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: The server cannot find the requested resource. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' /games/{game_id}/play/submit: post: operationId: postGamePlaySubmit @@ -502,6 +543,29 @@ components: code: type: string nullable: true + Submission: + type: object + required: + - submission_id + - game_id + - code + - code_size + - status + - created_at + properties: + submission_id: + type: integer + game_id: + type: integer + code: + type: string + code_size: + type: integer + status: + $ref: '#/components/schemas/ExecutionStatus' + created_at: + type: integer + x-go-type: int64 Tournament: type: object required: -- cgit v1.3.1