in mobile-save-for-later/src/main/scala/com/gu/sfl/lambda/LambdaApiGateway.scala [28:35]
def mapToOption[S,T](map: Map[S,T]): Option[Map[S,T]] = if (map.nonEmpty) Some(map) else None
def apply(lambdaRequest: LambdaRequest) : ApiGatewayLambdaRequest = {
ApiGatewayLambdaRequest(
body = lambdaRequest.maybeBody,
headers = mapToOption(lambdaRequest.headers)
)
}