From c508f30229b0c26d33f6339b2d074cdf2234981d Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Wed, 22 Dec 2021 11:35:06 +0800 Subject: [PATCH] style: ktlint format --- .../security/SecurityConfiguration.kt | 4 ---- .../api/rest/dto/BookMetadataUpdateDto.kt | 20 +++++++++---------- .../api/rest/dto/SeriesMetadataUpdateDto.kt | 20 +++++++++---------- 3 files changed, 20 insertions(+), 24 deletions(-) diff --git a/komga/src/main/kotlin/org/gotson/komga/infrastructure/security/SecurityConfiguration.kt b/komga/src/main/kotlin/org/gotson/komga/infrastructure/security/SecurityConfiguration.kt index a89030c60..4ee21405f 100644 --- a/komga/src/main/kotlin/org/gotson/komga/infrastructure/security/SecurityConfiguration.kt +++ b/komga/src/main/kotlin/org/gotson/komga/infrastructure/security/SecurityConfiguration.kt @@ -42,7 +42,6 @@ class SecurityConfiguration( http .cors {} .csrf { it.disable() } - .authorizeRequests { // restrict all actuator endpoints to ADMIN only it.requestMatchers(EndpointRequest.toAnyEndpoint()).hasRole(ROLE_ADMIN) @@ -61,15 +60,12 @@ class SecurityConfiguration( "/sse/**" ).hasRole(ROLE_USER) } - .headers { it.cacheControl().disable() // headers are set in WebMvcConfiguration } - .httpBasic { it.authenticationDetailsSource(userAgentWebAuthenticationDetailsSource) } - .logout { it.logoutUrl("/api/v1/users/logout") it.deleteCookies(sessionCookieName) diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/BookMetadataUpdateDto.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/BookMetadataUpdateDto.kt index 67738b51d..c8dfbfbf0 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/BookMetadataUpdateDto.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/BookMetadataUpdateDto.kt @@ -20,8 +20,8 @@ class BookMetadataUpdateDto { var summary: String? by Delegates.observable(null) { prop, _, _ -> - isSet[prop.name] = true - } + isSet[prop.name] = true + } var summaryLock: Boolean? = null @@ -36,31 +36,31 @@ class BookMetadataUpdateDto { var releaseDate: LocalDate? by Delegates.observable(null) { prop, _, _ -> - isSet[prop.name] = true - } + isSet[prop.name] = true + } var releaseDateLock: Boolean? = null @get:Valid var authors: List? by Delegates.observable(null) { prop, _, _ -> - isSet[prop.name] = true - } + isSet[prop.name] = true + } var authorsLock: Boolean? = null var tags: Set? by Delegates.observable(null) { prop, _, _ -> - isSet[prop.name] = true - } + isSet[prop.name] = true + } var tagsLock: Boolean? = null @get:NullOrBlankOrISBN var isbn: String? by Delegates.observable(null) { prop, _, _ -> - isSet[prop.name] = true - } + isSet[prop.name] = true + } var isbnLock: Boolean? = null } diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/SeriesMetadataUpdateDto.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/SeriesMetadataUpdateDto.kt index 7dbe972e8..d1b8514fd 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/SeriesMetadataUpdateDto.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/SeriesMetadataUpdateDto.kt @@ -35,16 +35,16 @@ class SeriesMetadataUpdateDto { var readingDirection: SeriesMetadata.ReadingDirection? by Delegates.observable(null) { prop, _, _ -> - isSet[prop.name] = true - } + isSet[prop.name] = true + } var readingDirectionLock: Boolean? = null @get:PositiveOrZero var ageRating: Int? by Delegates.observable(null) { prop, _, _ -> - isSet[prop.name] = true - } + isSet[prop.name] = true + } var ageRatingLock: Boolean? = null @@ -55,23 +55,23 @@ class SeriesMetadataUpdateDto { var genres: Set? by Delegates.observable(null) { prop, _, _ -> - isSet[prop.name] = true - } + isSet[prop.name] = true + } var genresLock: Boolean? = null var tags: Set? by Delegates.observable(null) { prop, _, _ -> - isSet[prop.name] = true - } + isSet[prop.name] = true + } var tagsLock: Boolean? = null @get:Positive var totalBookCount: Int? by Delegates.observable(null) { prop, _, _ -> - isSet[prop.name] = true - } + isSet[prop.name] = true + } var totalBookCountLock: Boolean? = null }