Skip to content

Commit 5343945

Browse files
committed
changed the API response to empty in case user does not exist.
1 parent 30dcd9c commit 5343945

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/user/service/UserServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ public Mono<Boolean> lostPassword(String userEmail) {
282282
String token = generateNewRandomPwd();
283283
Instant tokenExpiry = Instant.now().plus(12, ChronoUnit.HOURS);
284284
if (!emailCommunicationService.sendPasswordResetEmail(userEmail, token, emailTemplate)) {
285-
return ofError(BizError.AUTH_ERROR, "SENDING_EMAIL_FAILED");
285+
return Mono.empty();
286286
}
287287
user.setPasswordResetToken(HashUtils.hash(token.getBytes()));
288288
user.setPasswordResetTokenExpiry(tokenExpiry);

server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/usermanagement/UserController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public Mono<ResponseView<String>> resetPassword(@RequestBody ResetPasswordReques
149149
@Override
150150
public Mono<ResponseView<Boolean>> lostPassword(@RequestBody LostPasswordRequest request) {
151151
if (StringUtils.isBlank(request.userEmail())) {
152-
return ofError(BizError.INVALID_PARAMETER, "INVALID_PARAMETER");
152+
return Mono.empty();
153153
}
154154
return userApiService.lostPassword(request.userEmail())
155155
.map(ResponseView::success);

0 commit comments

Comments
 (0)