Skip to content
This repository was archived by the owner on Dec 9, 2025. It is now read-only.

Commit e2a140e

Browse files
committed
fix sql query
1 parent b5ce980 commit e2a140e

File tree

1 file changed

+1
-1
lines changed
  • src/main/java/com/appirio/tech/core/service/identity/dao

1 file changed

+1
-1
lines changed

src/main/java/com/appirio/tech/core/service/identity/dao/UserDAO.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public abstract class UserDAO implements DaoBase<User>, Transactional<UserDAO> {
176176
public abstract int update2faOtp(@Bind("id") long id, @Bind("otp") String otp);
177177

178178
@SqlUpdate(
179-
"UPDATE common_oltp.user_2fa SET otp=null, otp_expire=null " +
179+
"UPDATE common_oltp.user_2fa x SET otp=null, otp_expire=null " +
180180
"FROM (SELECT id, otp, otp_expire FROM common_oltp.user_2fa WHERE user_id=:userId FOR UPDATE)y " +
181181
"WHERE x.id=y.id " +
182182
"RETURNING CASE WHEN y.otp=:otp and y.otp_expire > current_timestamp THEN 1 ELSE 0 END")

0 commit comments

Comments
 (0)