Created
March 27, 2015 16:27
-
-
Save amolbrid/78f90b79307d77cbc2e9 to your computer and use it in GitHub Desktop.
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
pathPrefix("advertisers") { | |
pathEnd { | |
get { | |
onSuccess(advertisersService.list) { advs ⇒ | |
complete(advs) | |
} | |
} ~ | |
post { | |
entity(as[JObject]) { jObject ⇒ | |
val advertiser = jObject.extract[Advertiser] | |
onSuccess(advertisersService.create(advertiser)) { adv ⇒ | |
complete(adv) | |
} | |
} | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment