-
-
Save ajrouvoet/fa30e5c9f90ae9ace5c6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import blogimplicits._ | |
class BlogCtrl(db: Database) extends RestFullCtrl(Blogs, db) { | |
def parseId(s: String) = s.toInt | |
override val deserializer: PartialFunction[JValue, Blog] = { | |
case jobj:JObject => (jobj ~ ("author_id", 1)) | |
.extract[Blog](defaultFormats, implicitly[Manifest[Blog]]) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment