fix(report): optimize wechat toast length limit and add admin violation reports management center
这个提交包含在:
@@ -1337,6 +1337,25 @@ app.get('/api/reports', async (_req: Request, res: Response) => {
|
||||
}
|
||||
});
|
||||
|
||||
// 管理员处置不良违规举报工单
|
||||
app.post('/api/reports/:id/handle', async (req: Request, res: Response) => {
|
||||
try {
|
||||
const { id } = req.params;
|
||||
const { action, handleNote, penaltyOptions } = req.body || {};
|
||||
if (!action || !['punish', 'reject'].includes(action)) {
|
||||
return res.status(400).json({ code: 40000, message: '请指定合法的处理动作 (punish 或 reject)' });
|
||||
}
|
||||
const result = await repo.handleReport(id, action, handleNote, penaltyOptions);
|
||||
res.json({
|
||||
code: 20000,
|
||||
data: result,
|
||||
message: action === 'punish' ? '已核实举报并执行违规处置' : '已驳回该违规举报工单'
|
||||
});
|
||||
} catch (err: any) {
|
||||
res.status(500).json({ code: 50000, message: err.message });
|
||||
}
|
||||
});
|
||||
|
||||
app.get('/api/arbitrations', async (_req: Request, res: Response) => {
|
||||
try {
|
||||
const arbitrations = await repo.getArbitrations();
|
||||
|
||||
在新工单中引用
屏蔽一个用户