This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package utils.anorm | |
import anorm.ParameterValue | |
import anorm.SQL | |
/** | |
* @see Copy from http://nineofclouds.blogspot.fr/2013/04/in-clause-with-anorm.html | |
* @param query | |
* @param parameterValues | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package utils | |
import javax.mail.internet.InternetAddress | |
import org.apache.commons.mail._ | |
import scala.util.{Try, Failure, Success} | |
import scala.concurrent.ExecutionContext | |
import scala.concurrent.Future | |
import java.io._ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Send back a JSON object {"connected": false} | |
* or {"connected": true, "firstname": "Jean", "lastname": "DUPONT"} | |
* | |
* By default, the JSON object is wrapped in JSONP. | |
* But it can be sent as it if we're asked explicitly for JSON (http://…/login.json) | |
* | |
* See http://jsfiddle.net/HjCc2/6/ for usage. | |
*/ | |
def login = { |