修复申请原因可能为空的bug

This commit is contained in:
WilliamColton
2025-08-04 18:36:32 +08:00
parent 6fa5978613
commit 3b82a4aba0
2 changed files with 7 additions and 7 deletions

View File

@@ -155,7 +155,7 @@ public class AuthController {
));
}
if (req.reason == null || req.reason.length() <= 20) {
if (req.reason == null || req.reason.trim().length() <= 20) {
return ResponseEntity.badRequest().body(Map.of(
"error", "Reason's length must longer than 20",
"reason_code", "INVALID_CREDENTIALS"