Skip to content

Instantly share code, notes, and snippets.

@juliuscanute
Last active July 4, 2019 00:51
Show Gist options
  • Save juliuscanute/c5ff37ca067ff9142378ea455d732faa to your computer and use it in GitHub Desktop.
Save juliuscanute/c5ff37ca067ff9142378ea455d732faa to your computer and use it in GitHub Desktop.
Get Total Pages in Dictionary
class DictionaryTotalPageHandler {
private val global = Startup
@FunctionName("getNumberOfPagesInDictionary")
fun run(
@HttpTrigger(name = "req", methods = [HttpMethod.GET], route = "v1/dictionary/pages", authLevel = AuthorizationLevel.ANONYMOUS) request: HttpRequestMessage<Optional<String>>,
context: ExecutionContext): HttpResponseMessage {
context.logger.info("Processing get pages of dictionary")
val result = DictionaryController().getNumberOfPagesInDictionary()
return getResponse(request, result)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment