Add ktlint config

This commit is contained in:
2020-07-03 00:28:11 +02:00
parent fb471f8100
commit 9212d23933
19 changed files with 145 additions and 125 deletions
+1 -2
View File
@@ -29,7 +29,6 @@ class NoteRoutes(noteService: NoteService) : RoutingBuilder({
}
})
private fun Route.createNote(noteService: NoteService) {
post {
val userId = call.authenticatedUserId()
@@ -42,7 +41,7 @@ private fun Route.createNote(noteService: NoteService) {
private fun Route.getAllNotes(noteService: NoteService) {
get {
val userId = call.authenticatedUserId()
val limit = call.parameters["limit"]?.toInt() ?: 20// FIXME validate
val limit = call.parameters["limit"]?.toInt() ?: 20 // FIXME validate
val after = call.parameters["after"]?.let { UUID.fromString(it) } // FIXME validate
val notes = noteService.findAll(userId, limit, after)
call.respond(notes)
-3
View File
@@ -59,7 +59,6 @@ private fun Route.deleteUser(userService: UserService) {
}
}
private fun Route.createUser(userService: UserService) {
post {
val user = call.receiveValidated(registerValidator)
@@ -74,7 +73,6 @@ private fun Route.createUser(userService: UserService) {
}
}
private fun Route.login(
userService: UserService,
passwordHash: PasswordHash,
@@ -99,7 +97,6 @@ private fun Route.login(
}
}
private fun Route.refreshToken(userService: UserService, authJWT: SimpleJWT, refreshJWT: SimpleJWT) {
post {
val token = call.receive<RefreshToken>().refreshToken