Commit a53789c2 authored by Yechang's avatar Yechang
Browse files

fix(submission): try to fix the missing feedback

parent 1471381c
Loading
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ import { createJudgementByHTTP, execute, SlotType } from '../oj';
import type { File, Problem, Submission } from '@prisma/client';
import { commandSchema } from '$lib/shared/command';
import { toExecutableCommand } from '$lib/utils/index';
import { linkProcessToSubmission } from '$lib/processes';

type CreateSubmissionSchema = {
	problemId: number;
@@ -71,7 +72,10 @@ export const createSubmission = async ({
	} else {
		const command = commandRes.data;
		command.inputs = toExecutableCommand(command.inputs, { submission });
		await execute(command);
		const process = await execute(command);
		if (process) {
			await linkProcessToSubmission(process.name, submission.name);
		}
	}

	return submission;
+1 −1
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ export async function POST({ request, params }) {
								message: data.data.result_string
							},
							{
								type: 'time',
								type: 'time-usage',
								message: data.data.execution_time
							}
						] as z.infer<typeof contentSchema>,