Created
July 31, 2016 13:25
-
-
Save muuki88/a0d0de8a4f6116c9c934af1e0116a829 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
// user endpoint which sets a UserContext | |
val userMean: Endpoint[MeanForUser] = get("weather" / "mean" / "user" :: long) { userId: Long => | |
val userContext = UserContext(userId) | |
Contexts.broadcast.let(UserContext, userContext) { | |
client.mean().map(mean => Ok(MeanForUser(mean, userId))) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment