Remove print statement
This commit is contained in:
parent
503c80275e
commit
8b1364473d
@ -8,19 +8,16 @@ import io.ktor.response.*
|
|||||||
import io.ktor.routing.*
|
import io.ktor.routing.*
|
||||||
import org.kodein.di.Kodein
|
import org.kodein.di.Kodein
|
||||||
import org.kodein.di.generic.instance
|
import org.kodein.di.generic.instance
|
||||||
import kotlin.system.measureTimeMillis
|
|
||||||
|
|
||||||
fun Routing.notes(kodein: Kodein) {
|
fun Routing.notes(kodein: Kodein) {
|
||||||
val notesService by kodein.instance<NotesService>()
|
val notesService by kodein.instance<NotesService>()
|
||||||
|
|
||||||
authenticate {
|
authenticate {
|
||||||
get("/notes") {
|
get("/notes") {
|
||||||
val time = measureTimeMillis {
|
|
||||||
val userId = call.userId()
|
val userId = call.userId()
|
||||||
val notes = notesService.getNotes(userId)
|
val notes = notesService.getNotes(userId)
|
||||||
call.respond(notes)
|
call.respond(notes)
|
||||||
}
|
}
|
||||||
application.log.info("Time taken: $time ms")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user