Permalink
Browse files

Do not create table in UserIndex class

  • Loading branch information...
aki-ks committed Dec 5, 2018
1 parent c166130 commit e43f7017940ea4601659a772513b35729f243e15
Showing with 1 addition and 2 deletions.
  1. +1 −2 auth-impl/src/main/scala/me/aki/fileheaven/auth/impl/userindex.scala
@@ -32,8 +32,7 @@ object UserIndex {
class UserIndex(session: CassandraSession)(implicit ec: ExecutionContext) {
import UserIndex._

private val tableCreation = createTable(session)
def prepared[A](future: Future[A]) = tableCreation.flatMap(_ => future)
def prepared[A](future: Future[A]) = future

private val selectByNameStatement = prepared { session.prepare(s"SELECT * FROM $TableName WHERE $Name=?") }
private val selectByEmailStatement = prepared { session.prepare(s"SELECT * FROM $TableName WHERE $Email=?") }

0 comments on commit e43f701

Please sign in to comment.