Created
September 14, 2021 06:42
-
-
Save hiteshchopra11/c53460c0843e651b4df90e60e677434d to your computer and use it in GitHub Desktop.
This file contains 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
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