From 6a4f1fe07e4da252004d3dc2cc0c4db064cc6447 Mon Sep 17 00:00:00 2001 From: Zisu Zhang Date: Wed, 17 Jan 2024 23:17:27 +0800 Subject: [PATCH] fix: submit form (#20) * fix: submit form * chore: remove unused logic * chore: bump version --- .yarn/versions/05aa2e51.yml | 3 +++ apps/frontend/src/components/problem/ProblemSubmit.vue | 6 +++--- apps/server/src/routes/problem/index.ts | 7 +------ 3 files changed, 7 insertions(+), 9 deletions(-) create mode 100644 .yarn/versions/05aa2e51.yml diff --git a/.yarn/versions/05aa2e51.yml b/.yarn/versions/05aa2e51.yml new file mode 100644 index 0000000..85ee0e5 --- /dev/null +++ b/.yarn/versions/05aa2e51.yml @@ -0,0 +1,3 @@ +releases: + "@aoi-js/frontend": patch + "@aoi-js/server": patch diff --git a/apps/frontend/src/components/problem/ProblemSubmit.vue b/apps/frontend/src/components/problem/ProblemSubmit.vue index 76fddc6..65906a2 100644 --- a/apps/frontend/src/components/problem/ProblemSubmit.vue +++ b/apps/frontend/src/components/problem/ProblemSubmit.vue @@ -14,13 +14,13 @@ - + {{ t('submit-form') }} - + {{ t('submit-upload-file') }} - + {{ t('submit-upload-dir') }} diff --git a/apps/server/src/routes/problem/index.ts b/apps/server/src/routes/problem/index.ts index 24bf46d..81107fe 100644 --- a/apps/server/src/routes/problem/index.ts +++ b/apps/server/src/routes/problem/index.ts @@ -152,12 +152,7 @@ export const problemRoutes = defineRoutes(async (s) => { { $unwind: { path: '$status', preserveNullAndEmptyArrays: true } } ]) .toArray() - // add status.solutionCount=0 for problems with status - items.forEach((item) => { - if (item.status && !item.status.solutionCount) { - item.status = { ...item.status, solutionCount: 0 } - } - }) + return { total, items } } )