Skip to content

Commit

Permalink
chore: formatKotlin
Browse files Browse the repository at this point in the history
  • Loading branch information
mabels committed May 2, 2024
1 parent d94ed84 commit 3630914
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Binary file added router/.build.gradle.kts.swp
Binary file not shown.
10 changes: 5 additions & 5 deletions router/src/main/kotlin/io/moia/router/RequestPredicate.kt
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ open class RequestPredicateImpl(
override val method: String,
override val pathPattern: String,
override var produces: Set<String>,
override var consumes: Set<String>,
): RequestPredicate {
override var consumes: Set<String>
) : RequestPredicate {

override var requiredPermissions: Set<String> = emptySet()
override fun consuming(vararg mediaTypes: String): RequestPredicate {
override var requiredPermissions: Set<String> = emptySet()
override fun consuming(vararg mediaTypes: String): RequestPredicate {
consumes = mediaTypes.toSet()
return this
}

override fun producing(vararg mediaTypes: String): RequestPredicate {
override fun producing(vararg mediaTypes: String): RequestPredicate {
produces = mediaTypes.toSet()
return this
}
Expand Down
2 changes: 1 addition & 1 deletion router/src/main/kotlin/io/moia/router/Router.kt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Router(private val predicateFactory: PredicateFactory) {
handlerFunction: HandlerFunction<I, T>,
consuming: Set<String> = defaultConsuming
) = predicateFactory(method, pattern, consuming, defaultProducing)
.also { routes += RouterFunction(it, handlerFunction) }
.also { routes += RouterFunction(it, handlerFunction) }

companion object {

Expand Down

0 comments on commit 3630914

Please sign in to comment.