From 67372f29b654474b0b4ddf410631004d38a088a5 Mon Sep 17 00:00:00 2001 From: Rahul Rudragoudar Date: Mon, 3 Jun 2019 13:05:07 +0530 Subject: [PATCH] Bug fix Query updated to map uuid to captcha token Signed-off-by: Rahul Rudragoudar --- src/main/scala/lc/Main.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/lc/Main.scala b/src/main/scala/lc/Main.scala index 58258ad..1c4f055 100644 --- a/src/main/scala/lc/Main.scala +++ b/src/main/scala/lc/Main.scala @@ -29,7 +29,7 @@ class Captcha(throttle: Int) { val mapPstmt: PreparedStatement = con.prepareStatement("INSERT INTO mapId(uuid, token) VALUES (?, ?)") val selectPstmt: PreparedStatement = con.prepareStatement("SELECT secret, provider FROM challenge WHERE token = ?") val imagePstmt: PreparedStatement = con.prepareStatement("SELECT image FROM challenge c, mapId m WHERE c.token=m.token AND m.uuid = ?") - val updatePstmt: PreparedStatement = con.prepareStatement("UPDATE challenge SET solved = True WHERE token = ?") + val updatePstmt: PreparedStatement = con.prepareStatement("UPDATE challenge c, mapId m SET c.solved = True WHERE c.token = m.token AND m.uuid = ?") val userPstmt: PreparedStatement = con.prepareStatement("INSERT INTO users(email, hash) VALUES (?,?)") val filters = Map("FilterChallenge" -> new FilterChallenge,