Created
December 11, 2019 09:23
-
-
Save lforite/36a87f7ccc6d7cd1ef062522b2ae7052 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
| case class ApiA(serviceA: ServiceA) { | |
| def postA() = Route { request => | |
| val correlationId = request.headers("X-Correlation-Id") | |
| .map(CorrelationId) | |
| .getOrElse(CorrelationId.new) | |
| serviceA.createA(request.body.decodeJson[EntityA]) | |
| .run(correlationId) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment