Commit 6ea31eaf authored by Yechang's avatar Yechang
Browse files

fix: penalty

parent 0ad2b839
Loading
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -34,9 +34,6 @@ export const fixAndCalculatePenalty = async (currentSubmissionId: number): Promi
    const { problem } = submission
    const penalty = problem.penalty || 0
    const penaltyAfter = problem.penaltyAfter || 0
    if (penalty === 0) {
        return 0
    }

    const submissions = await db.submission.findMany({
        where: {
+1 −1
Original line number Diff line number Diff line
@@ -158,7 +158,7 @@ export const PUT = async ({ request, params }) => {
            return new Response(null, { status: 201 })
        }

        const feedback = await db.submissionFeedback.create({
        await db.submissionFeedback.create({
            data: {
                score: -1,
                description: res.status,