Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (17 sloc) 378 Bytes
package service
import model.{User, Users}
import scala.concurrent.Future
object UserService {
def addUser(user: User): Future[String] = {
Users.add(user)
}
def deleteUser(id: Long): Future[Int] = {
Users.delete(id)
}
def getUser(id: Long): Future[Option[User]] = {
Users.get(id)
}
def listAllUsers: Future[Seq[User]] = {
Users.listAll
}
}