Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
get("/notes") {
val notes = db.from(NotesResponse).select().map {
val id = it[NotesEntity.id]
val note = it[NotesEntity.note]
Note(id ?: -1, note ?: "")
}
// Returns the response to the User
call.respond(notes)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment