fix: 审核通过时发送 names[]/urls[] 数组,列表正确显示多名称多地址

This commit is contained in:
mediabot-pt
2026-06-30 14:09:40 +08:00
parent 266669e96b
commit 9be2d0313a
4 changed files with 14 additions and 12 deletions

View File

@@ -277,12 +277,14 @@ public class AdminController {
HttpServletRequest request) {
checkAdmin(request);
Long reviewerId = (Long) request.getAttribute("accountId");
String name = body != null ? (String) body.get("name") : null;
String baseUrl = body != null ? (String) body.get("baseUrl") : null;
@SuppressWarnings("unchecked")
List<String> names = body != null ? (List<String>) body.get("names") : null;
@SuppressWarnings("unchecked")
List<String> urls = body != null ? (List<String>) body.get("urls") : null;
String siteType = body != null ? (String) body.get("siteType") : null;
String status = body != null ? (String) body.get("status") : null;
String notes = body != null ? (String) body.get("notes") : null;
siteService.approveChange(id, reviewerId, name, baseUrl, siteType, status, notes);
siteService.approveChange(id, reviewerId, names, urls, siteType, status, notes);
log.info("Change approved: id={}, reviewer={}", id, reviewerId);
return ApiResponse.success();
}