diff --git a/src/main/scala/lc/Main.scala b/src/main/scala/lc/Main.scala index 412e27b..18e4753 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 c, mapId m SET c.solved = True WHERE c.token = m.token AND m.uuid = ?") + val updatePstmt: PreparedStatement = con.prepareStatement("UPDATE challenge SET solved = True WHERE token = (SELECT m.token FROM mapId m, challenge c WHERE m.token=c.token AND m.uuid = ?)") val userPstmt: PreparedStatement = con.prepareStatement("INSERT INTO users(email, hash) VALUES (?,?)") val providers = Map("FilterChallenge" -> new FilterChallenge,