|
|
@ -325,6 +325,12 @@ app.post('/admin/other', async (req, res) => { |
|
|
|
for (const a of articles) { |
|
|
|
for (const a of articles) { |
|
|
|
await a.resetReplyCountAndTime(); |
|
|
|
await a.resetReplyCountAndTime(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} else if (req.body.type === 'reset_codelen') { |
|
|
|
|
|
|
|
const submissions = await JudgeState.query(); |
|
|
|
|
|
|
|
for (const s of submissions) { |
|
|
|
|
|
|
|
s.code_length = s.code.length; |
|
|
|
|
|
|
|
await s.save(); |
|
|
|
|
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
throw new ErrorMessage("操作类型不正确"); |
|
|
|
throw new ErrorMessage("操作类型不正确"); |
|
|
|
} |
|
|
|
} |
|
|
|