Skip to content

Instantly share code, notes, and snippets.

@johntbush
Last active August 29, 2015 14:05
Show Gist options
  • Save johntbush/81d01375b8bb91dacb89 to your computer and use it in GitHub Desktop.
Save johntbush/81d01375b8bb91dacb89 to your computer and use it in GitHub Desktop.
either this or that
def getExceptionTemplateByEnv(templateId: String) = Action {
Core.getExceptionTemplatesByEnv(templateId).fold (
outputDataStoreResponse,
(templates) => Ok(Json.toJson(templates))
)
}
def outputDataStoreResponse: (DataStoreResponse) => Result = {
(dataStoreResponse) => NotFound(dataStoreResponse.jsValue)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment