Skip to content

Commit ceb44c4

Browse files
committed
拦截一下空字符串
1 parent 11dda82 commit ceb44c4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

web/src/main/java/info/xiaomo/web/controller/UserController.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ public HashMap<String, Object> register(
9494
@RequestParam String email
9595
) throws Exception {
9696
if (email.equals("")) {
97-
return null;
97+
result.put(code, error);
98+
return result;
9899
}
99100
UserModel userModel = service.findUserByEmail(email);
100101
//邮箱被占用

0 commit comments

Comments
 (0)