From 308522611342b1e08d85bd83cf745202dfa1c12d Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Thu, 2 Dec 2021 18:02:28 +0800 Subject: [PATCH] refactor: move opds and rest packages under a common api root --- .../komga/infrastructure/jooq/BookDtoDao.kt | 12 +++---- .../infrastructure/jooq/ReadProgressDao.kt | 2 +- .../infrastructure/jooq/ReadProgressDtoDao.kt | 6 ++-- .../komga/infrastructure/jooq/SeriesDtoDao.kt | 12 +++---- .../komga/infrastructure/language/Utils.kt | 4 +++ .../infrastructure/search/LuceneEntity.kt | 4 +-- .../search/SearchIndexLifecycle.kt | 8 ++--- .../gotson/komga/interfaces/api/Constants.kt | 3 ++ .../{ => api}/opds/OpdsController.kt | 33 +++++++++---------- .../{ => api}/opds/dto/OpdsAuthor.kt | 2 +- .../{ => api}/opds/dto/OpdsEntry.kt | 2 +- .../interfaces/{ => api}/opds/dto/OpdsFeed.kt | 2 +- .../interfaces/{ => api}/opds/dto/OpdsLink.kt | 2 +- .../opds/dto/OpenSearchDescription.kt | 2 +- .../{ => api}/opds/dto/XmlNamespaces.kt | 2 +- .../persistence/BookDtoRepository.kt | 4 +-- .../persistence/ReadProgressDtoRepository.kt | 6 ++-- .../persistence/SeriesDtoRepository.kt | 6 ++-- .../{ => api}/rest/BookController.kt | 24 +++++++------- .../{ => api}/rest/ClaimController.kt | 6 ++-- .../rest/ErrorHandlingControllerAdvice.kt | 2 +- .../{ => api}/rest/FileSystemController.kt | 2 +- .../{ => api}/rest/LibraryController.kt | 12 +++---- .../{ => api}/rest/LoginController.kt | 2 +- .../{ => api}/rest/OAuth2Controller.kt | 2 +- .../{ => api}/rest/ReadListController.kt | 24 +++++++------- .../{ => api}/rest/ReferentialController.kt | 6 ++-- .../rest/SeriesCollectionController.kt | 16 ++++----- .../{ => api}/rest/SeriesController.kt | 32 +++++++++--------- .../{ => api}/rest/TaskController.kt | 2 +- .../rest/TransientBooksController.kt | 4 +-- .../{ => api}/rest/UserController.kt | 20 +++++------ .../rest/dto/AuthenticationActivityDto.kt | 2 +- .../{ => api}/rest/dto/AuthorDto.kt | 2 +- .../interfaces/{ => api}/rest/dto/BookDto.kt | 2 +- .../{ => api}/rest/dto/BookImportBatchDto.kt | 2 +- .../rest/dto/BookMetadataUpdateDto.kt | 2 +- .../rest/dto/CollectionCreationDto.kt | 2 +- .../{ => api}/rest/dto/CollectionDto.kt | 3 +- .../{ => api}/rest/dto/CollectionUpdateDto.kt | 2 +- .../{ => api}/rest/dto/GroupCountDto.kt | 2 +- .../{ => api}/rest/dto/LibraryCreationDto.kt | 2 +- .../{ => api}/rest/dto/LibraryDto.kt | 2 +- .../{ => api}/rest/dto/LibraryUpdateDto.kt | 2 +- .../interfaces/{ => api}/rest/dto/PageDto.kt | 2 +- .../{ => api}/rest/dto/ReadListCreationDto.kt | 2 +- .../{ => api}/rest/dto/ReadListDto.kt | 3 +- .../rest/dto/ReadListRequestResultDto.kt | 2 +- .../{ => api}/rest/dto/ReadListUpdateDto.kt | 2 +- .../rest/dto/ReadProgressUpdateDto.kt | 2 +- .../{ => api}/rest/dto/SeriesCoverDto.kt | 2 +- .../{ => api}/rest/dto/SeriesDto.kt | 2 +- .../rest/dto/SeriesMetadataUpdateDto.kt | 2 +- .../{ => api}/rest/dto/SeriesThumbnailDto.kt | 2 +- .../rest/dto/TachiyomiReadProgressDto.kt | 2 +- .../dto/TachiyomiReadProgressUpdateDto.kt | 2 +- .../rest/dto/TachiyomiReadProgressV2Dto.kt | 2 +- .../interfaces/{ => api}/rest/dto/UserDto.kt | 2 +- .../gotson/komga/interfaces/rest/dto/Utils.kt | 8 ----- .../service/LibraryContentLifecycleTest.kt | 2 +- .../{ => api}/opds/OpdsControllerTest.kt | 4 +-- .../{ => api}/rest/BookControllerTest.kt | 2 +- .../{ => api}/rest/ClaimControllerTest.kt | 2 +- .../rest/FileSystemControllerTest.kt | 2 +- .../{ => api}/rest/LibraryControllerTest.kt | 2 +- .../{ => api}/rest/MockSpringSecurity.kt | 2 +- .../{ => api}/rest/ReadListControllerTest.kt | 2 +- .../rest/SeriesCollectionControllerTest.kt | 2 +- .../{ => api}/rest/SeriesControllerTest.kt | 2 +- .../{ => api}/rest/UserControllerDemoTest.kt | 2 +- .../{ => api}/rest/UserControllerTest.kt | 2 +- 71 files changed, 177 insertions(+), 177 deletions(-) create mode 100644 komga/src/main/kotlin/org/gotson/komga/interfaces/api/Constants.kt rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/opds/OpdsController.kt (95%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/opds/dto/OpdsAuthor.kt (87%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/opds/dto/OpdsEntry.kt (96%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/opds/dto/OpdsFeed.kt (96%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/opds/dto/OpdsLink.kt (97%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/opds/dto/OpenSearchDescription.kt (95%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/opds/dto/XmlNamespaces.kt (77%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{rest => api}/persistence/BookDtoRepository.kt (91%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{rest => api}/persistence/ReadProgressDtoRepository.kt (61%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{rest => api}/persistence/SeriesDtoRepository.kt (80%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/BookController.kt (97%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/ClaimController.kt (90%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/ErrorHandlingControllerAdvice.kt (96%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/FileSystemController.kt (98%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/LibraryController.kt (95%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/LoginController.kt (95%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/OAuth2Controller.kt (94%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/ReadListController.kt (94%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/ReferentialController.kt (98%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/SeriesCollectionController.kt (94%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/SeriesController.kt (96%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/TaskController.kt (94%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/TransientBooksController.kt (97%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/UserController.kt (92%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/dto/AuthenticationActivityDto.kt (93%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/dto/AuthorDto.kt (75%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/dto/BookDto.kt (97%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/dto/BookImportBatchDto.kt (86%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/dto/BookMetadataUpdateDto.kt (98%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/dto/CollectionCreationDto.kt (86%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/dto/CollectionDto.kt (87%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/dto/CollectionUpdateDto.kt (88%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/dto/GroupCountDto.kt (58%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/dto/LibraryCreationDto.kt (94%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/dto/LibraryDto.kt (96%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/dto/LibraryUpdateDto.kt (93%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/dto/PageDto.kt (72%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/dto/ReadListCreationDto.kt (86%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/dto/ReadListDto.kt (87%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/dto/ReadListRequestResultDto.kt (95%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/dto/ReadListUpdateDto.kt (87%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/dto/ReadProgressUpdateDto.kt (95%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/dto/SeriesCoverDto.kt (94%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/dto/SeriesDto.kt (97%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/dto/SeriesMetadataUpdateDto.kt (97%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/dto/SeriesThumbnailDto.kt (86%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/dto/TachiyomiReadProgressDto.kt (79%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/dto/TachiyomiReadProgressUpdateDto.kt (82%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/dto/TachiyomiReadProgressV2Dto.kt (82%) rename komga/src/main/kotlin/org/gotson/komga/interfaces/{ => api}/rest/dto/UserDto.kt (97%) delete mode 100644 komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/Utils.kt rename komga/src/test/kotlin/org/gotson/komga/interfaces/{ => api}/opds/OpdsControllerTest.kt (98%) rename komga/src/test/kotlin/org/gotson/komga/interfaces/{ => api}/rest/BookControllerTest.kt (99%) rename komga/src/test/kotlin/org/gotson/komga/interfaces/{ => api}/rest/ClaimControllerTest.kt (96%) rename komga/src/test/kotlin/org/gotson/komga/interfaces/{ => api}/rest/FileSystemControllerTest.kt (97%) rename komga/src/test/kotlin/org/gotson/komga/interfaces/{ => api}/rest/LibraryControllerTest.kt (98%) rename komga/src/test/kotlin/org/gotson/komga/interfaces/{ => api}/rest/MockSpringSecurity.kt (97%) rename komga/src/test/kotlin/org/gotson/komga/interfaces/{ => api}/rest/ReadListControllerTest.kt (99%) rename komga/src/test/kotlin/org/gotson/komga/interfaces/{ => api}/rest/SeriesCollectionControllerTest.kt (99%) rename komga/src/test/kotlin/org/gotson/komga/interfaces/{ => api}/rest/SeriesControllerTest.kt (99%) rename komga/src/test/kotlin/org/gotson/komga/interfaces/{ => api}/rest/UserControllerDemoTest.kt (96%) rename komga/src/test/kotlin/org/gotson/komga/interfaces/{ => api}/rest/UserControllerTest.kt (96%) diff --git a/komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookDtoDao.kt b/komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookDtoDao.kt index d19a0c3ae..fd833412e 100644 --- a/komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookDtoDao.kt +++ b/komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookDtoDao.kt @@ -6,12 +6,12 @@ import org.gotson.komga.infrastructure.datasource.SqliteUdfDataSource import org.gotson.komga.infrastructure.search.LuceneEntity import org.gotson.komga.infrastructure.search.LuceneHelper import org.gotson.komga.infrastructure.web.toFilePath -import org.gotson.komga.interfaces.rest.dto.AuthorDto -import org.gotson.komga.interfaces.rest.dto.BookDto -import org.gotson.komga.interfaces.rest.dto.BookMetadataDto -import org.gotson.komga.interfaces.rest.dto.MediaDto -import org.gotson.komga.interfaces.rest.dto.ReadProgressDto -import org.gotson.komga.interfaces.rest.persistence.BookDtoRepository +import org.gotson.komga.interfaces.api.persistence.BookDtoRepository +import org.gotson.komga.interfaces.api.rest.dto.AuthorDto +import org.gotson.komga.interfaces.api.rest.dto.BookDto +import org.gotson.komga.interfaces.api.rest.dto.BookMetadataDto +import org.gotson.komga.interfaces.api.rest.dto.MediaDto +import org.gotson.komga.interfaces.api.rest.dto.ReadProgressDto import org.gotson.komga.jooq.Tables import org.gotson.komga.jooq.tables.records.BookMetadataRecord import org.gotson.komga.jooq.tables.records.BookRecord diff --git a/komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/ReadProgressDao.kt b/komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/ReadProgressDao.kt index eb0185a17..78808e82f 100644 --- a/komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/ReadProgressDao.kt +++ b/komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/ReadProgressDao.kt @@ -2,7 +2,7 @@ package org.gotson.komga.infrastructure.jooq import org.gotson.komga.domain.model.ReadProgress import org.gotson.komga.domain.persistence.ReadProgressRepository -import org.gotson.komga.interfaces.rest.dto.toUTC +import org.gotson.komga.infrastructure.language.toUTC import org.gotson.komga.jooq.Tables import org.gotson.komga.jooq.tables.records.ReadProgressRecord import org.jooq.DSLContext diff --git a/komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/ReadProgressDtoDao.kt b/komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/ReadProgressDtoDao.kt index 86a236049..23eac402b 100644 --- a/komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/ReadProgressDtoDao.kt +++ b/komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/ReadProgressDtoDao.kt @@ -1,8 +1,8 @@ package org.gotson.komga.infrastructure.jooq -import org.gotson.komga.interfaces.rest.dto.TachiyomiReadProgressDto -import org.gotson.komga.interfaces.rest.dto.TachiyomiReadProgressV2Dto -import org.gotson.komga.interfaces.rest.persistence.ReadProgressDtoRepository +import org.gotson.komga.interfaces.api.persistence.ReadProgressDtoRepository +import org.gotson.komga.interfaces.api.rest.dto.TachiyomiReadProgressDto +import org.gotson.komga.interfaces.api.rest.dto.TachiyomiReadProgressV2Dto import org.gotson.komga.jooq.Tables import org.jooq.AggregateFunction import org.jooq.Condition diff --git a/komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesDtoDao.kt b/komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesDtoDao.kt index 72dd27edb..c3bbf9bdc 100644 --- a/komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesDtoDao.kt +++ b/komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesDtoDao.kt @@ -8,12 +8,12 @@ import org.gotson.komga.infrastructure.datasource.SqliteUdfDataSource import org.gotson.komga.infrastructure.search.LuceneEntity import org.gotson.komga.infrastructure.search.LuceneHelper import org.gotson.komga.infrastructure.web.toFilePath -import org.gotson.komga.interfaces.rest.dto.AuthorDto -import org.gotson.komga.interfaces.rest.dto.BookMetadataAggregationDto -import org.gotson.komga.interfaces.rest.dto.GroupCountDto -import org.gotson.komga.interfaces.rest.dto.SeriesDto -import org.gotson.komga.interfaces.rest.dto.SeriesMetadataDto -import org.gotson.komga.interfaces.rest.persistence.SeriesDtoRepository +import org.gotson.komga.interfaces.api.persistence.SeriesDtoRepository +import org.gotson.komga.interfaces.api.rest.dto.AuthorDto +import org.gotson.komga.interfaces.api.rest.dto.BookMetadataAggregationDto +import org.gotson.komga.interfaces.api.rest.dto.GroupCountDto +import org.gotson.komga.interfaces.api.rest.dto.SeriesDto +import org.gotson.komga.interfaces.api.rest.dto.SeriesMetadataDto import org.gotson.komga.jooq.Tables import org.gotson.komga.jooq.tables.records.BookMetadataAggregationRecord import org.gotson.komga.jooq.tables.records.SeriesMetadataRecord diff --git a/komga/src/main/kotlin/org/gotson/komga/infrastructure/language/Utils.kt b/komga/src/main/kotlin/org/gotson/komga/infrastructure/language/Utils.kt index 5dd1e89c2..acd89c159 100644 --- a/komga/src/main/kotlin/org/gotson/komga/infrastructure/language/Utils.kt +++ b/komga/src/main/kotlin/org/gotson/komga/infrastructure/language/Utils.kt @@ -4,6 +4,7 @@ import org.apache.commons.lang3.StringUtils import java.time.LocalDate import java.time.LocalDateTime import java.time.ZoneId +import java.time.ZoneOffset import java.time.temporal.ChronoUnit import java.time.temporal.TemporalUnit import java.util.Date @@ -44,3 +45,6 @@ fun LocalDateTime.notEquals(other: LocalDateTime, precision: TemporalUnit = Chro fun String.stripAccents(): String = StringUtils.stripAccents(this) fun LocalDate.toDate(): Date = Date.from(this.atStartOfDay(ZoneId.of("Z")).toInstant()) + +fun LocalDateTime.toUTC(): LocalDateTime = + atZone(ZoneId.systemDefault()).withZoneSameInstant(ZoneOffset.UTC).toLocalDateTime() diff --git a/komga/src/main/kotlin/org/gotson/komga/infrastructure/search/LuceneEntity.kt b/komga/src/main/kotlin/org/gotson/komga/infrastructure/search/LuceneEntity.kt index 087bb88b7..e17a282b8 100644 --- a/komga/src/main/kotlin/org/gotson/komga/infrastructure/search/LuceneEntity.kt +++ b/komga/src/main/kotlin/org/gotson/komga/infrastructure/search/LuceneEntity.kt @@ -8,8 +8,8 @@ import org.apache.lucene.document.TextField import org.gotson.komga.domain.model.ReadList import org.gotson.komga.domain.model.SeriesCollection import org.gotson.komga.infrastructure.language.toDate -import org.gotson.komga.interfaces.rest.dto.BookDto -import org.gotson.komga.interfaces.rest.dto.SeriesDto +import org.gotson.komga.interfaces.api.rest.dto.BookDto +import org.gotson.komga.interfaces.api.rest.dto.SeriesDto enum class LuceneEntity(val type: String, val id: String, val defaultFields: Array) { Book("book", "book_id", arrayOf("title", "isbn")), diff --git a/komga/src/main/kotlin/org/gotson/komga/infrastructure/search/SearchIndexLifecycle.kt b/komga/src/main/kotlin/org/gotson/komga/infrastructure/search/SearchIndexLifecycle.kt index 969707e63..a410467c8 100644 --- a/komga/src/main/kotlin/org/gotson/komga/infrastructure/search/SearchIndexLifecycle.kt +++ b/komga/src/main/kotlin/org/gotson/komga/infrastructure/search/SearchIndexLifecycle.kt @@ -13,10 +13,10 @@ import org.gotson.komga.domain.persistence.SeriesCollectionRepository import org.gotson.komga.infrastructure.jms.QUEUE_SSE import org.gotson.komga.infrastructure.jms.QUEUE_SSE_SELECTOR import org.gotson.komga.infrastructure.jms.TOPIC_FACTORY -import org.gotson.komga.interfaces.rest.dto.BookDto -import org.gotson.komga.interfaces.rest.dto.SeriesDto -import org.gotson.komga.interfaces.rest.persistence.BookDtoRepository -import org.gotson.komga.interfaces.rest.persistence.SeriesDtoRepository +import org.gotson.komga.interfaces.api.persistence.BookDtoRepository +import org.gotson.komga.interfaces.api.persistence.SeriesDtoRepository +import org.gotson.komga.interfaces.api.rest.dto.BookDto +import org.gotson.komga.interfaces.api.rest.dto.SeriesDto import org.springframework.data.domain.Page import org.springframework.data.domain.PageRequest import org.springframework.data.domain.Pageable diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/api/Constants.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/Constants.kt new file mode 100644 index 000000000..ddbf2432c --- /dev/null +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/Constants.kt @@ -0,0 +1,3 @@ +package org.gotson.komga.interfaces.api + +internal const val MARK_READ = "markread" diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/opds/OpdsController.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/OpdsController.kt similarity index 95% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/opds/OpdsController.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/OpdsController.kt index 43219b771..b66dcb61e 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/opds/OpdsController.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/OpdsController.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.opds +package org.gotson.komga.interfaces.api.opds import mu.KotlinLogging import org.apache.commons.io.FilenameUtils @@ -23,20 +23,21 @@ import org.gotson.komga.domain.persistence.SeriesMetadataRepository import org.gotson.komga.domain.persistence.SeriesRepository import org.gotson.komga.infrastructure.jooq.UnpagedSorted import org.gotson.komga.infrastructure.security.KomgaPrincipal -import org.gotson.komga.interfaces.opds.dto.OpdsAuthor -import org.gotson.komga.interfaces.opds.dto.OpdsEntryAcquisition -import org.gotson.komga.interfaces.opds.dto.OpdsEntryNavigation -import org.gotson.komga.interfaces.opds.dto.OpdsFeed -import org.gotson.komga.interfaces.opds.dto.OpdsFeedAcquisition -import org.gotson.komga.interfaces.opds.dto.OpdsFeedNavigation -import org.gotson.komga.interfaces.opds.dto.OpdsLinkFeedNavigation -import org.gotson.komga.interfaces.opds.dto.OpdsLinkFileAcquisition -import org.gotson.komga.interfaces.opds.dto.OpdsLinkImage -import org.gotson.komga.interfaces.opds.dto.OpdsLinkImageThumbnail -import org.gotson.komga.interfaces.opds.dto.OpdsLinkPageStreaming -import org.gotson.komga.interfaces.opds.dto.OpdsLinkRel -import org.gotson.komga.interfaces.opds.dto.OpdsLinkSearch -import org.gotson.komga.interfaces.opds.dto.OpenSearchDescription +import org.gotson.komga.interfaces.api.MARK_READ +import org.gotson.komga.interfaces.api.opds.dto.OpdsAuthor +import org.gotson.komga.interfaces.api.opds.dto.OpdsEntryAcquisition +import org.gotson.komga.interfaces.api.opds.dto.OpdsEntryNavigation +import org.gotson.komga.interfaces.api.opds.dto.OpdsFeed +import org.gotson.komga.interfaces.api.opds.dto.OpdsFeedAcquisition +import org.gotson.komga.interfaces.api.opds.dto.OpdsFeedNavigation +import org.gotson.komga.interfaces.api.opds.dto.OpdsLinkFeedNavigation +import org.gotson.komga.interfaces.api.opds.dto.OpdsLinkFileAcquisition +import org.gotson.komga.interfaces.api.opds.dto.OpdsLinkImage +import org.gotson.komga.interfaces.api.opds.dto.OpdsLinkImageThumbnail +import org.gotson.komga.interfaces.api.opds.dto.OpdsLinkPageStreaming +import org.gotson.komga.interfaces.api.opds.dto.OpdsLinkRel +import org.gotson.komga.interfaces.api.opds.dto.OpdsLinkSearch +import org.gotson.komga.interfaces.api.opds.dto.OpenSearchDescription import org.springframework.data.domain.PageRequest import org.springframework.data.domain.Sort import org.springframework.http.HttpHeaders @@ -72,8 +73,6 @@ private const val ROUTE_READLISTS_ALL = "readlists" private const val ROUTE_PUBLISHERS_ALL = "publishers" private const val ROUTE_SEARCH = "search" -internal const val MARK_READ = "markread" - private const val ID_SERIES_ALL = "allSeries" private const val ID_SERIES_LATEST = "latestSeries" private const val ID_BOOKS_LATEST = "latestBooks" diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/opds/dto/OpdsAuthor.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/dto/OpdsAuthor.kt similarity index 87% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/opds/dto/OpdsAuthor.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/dto/OpdsAuthor.kt index 47804aba9..9b013d303 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/opds/dto/OpdsAuthor.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/dto/OpdsAuthor.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.opds.dto +package org.gotson.komga.interfaces.api.opds.dto import com.fasterxml.jackson.annotation.JsonInclude import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/opds/dto/OpdsEntry.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/dto/OpdsEntry.kt similarity index 96% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/opds/dto/OpdsEntry.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/dto/OpdsEntry.kt index a0355c394..674099ec0 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/opds/dto/OpdsEntry.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/dto/OpdsEntry.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.opds.dto +package org.gotson.komga.interfaces.api.opds.dto import com.fasterxml.jackson.annotation.JsonInclude import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/opds/dto/OpdsFeed.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/dto/OpdsFeed.kt similarity index 96% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/opds/dto/OpdsFeed.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/dto/OpdsFeed.kt index ad0b89cf3..6efd932d7 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/opds/dto/OpdsFeed.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/dto/OpdsFeed.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.opds.dto +package org.gotson.komga.interfaces.api.opds.dto import com.fasterxml.jackson.databind.annotation.JsonSerialize import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/opds/dto/OpdsLink.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/dto/OpdsLink.kt similarity index 97% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/opds/dto/OpdsLink.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/dto/OpdsLink.kt index 295ea8f6d..5ef43159b 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/opds/dto/OpdsLink.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/dto/OpdsLink.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.opds.dto +package org.gotson.komga.interfaces.api.opds.dto import com.fasterxml.jackson.databind.annotation.JsonSerialize import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/opds/dto/OpenSearchDescription.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/dto/OpenSearchDescription.kt similarity index 95% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/opds/dto/OpenSearchDescription.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/dto/OpenSearchDescription.kt index 7bc28c9f4..4cbfcb814 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/opds/dto/OpenSearchDescription.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/dto/OpenSearchDescription.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.opds.dto +package org.gotson.komga.interfaces.api.opds.dto import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/opds/dto/XmlNamespaces.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/dto/XmlNamespaces.kt similarity index 77% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/opds/dto/XmlNamespaces.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/dto/XmlNamespaces.kt index dbe214aa5..ad85080df 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/opds/dto/XmlNamespaces.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/dto/XmlNamespaces.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.opds.dto +package org.gotson.komga.interfaces.api.opds.dto const val ATOM = "http://www.w3.org/2005/Atom" const val OPDS_PSE = "http://vaemendis.net/opds-pse/ns" diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/persistence/BookDtoRepository.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/persistence/BookDtoRepository.kt similarity index 91% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/persistence/BookDtoRepository.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/persistence/BookDtoRepository.kt index 90a1d4d8c..8de2af567 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/persistence/BookDtoRepository.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/persistence/BookDtoRepository.kt @@ -1,7 +1,7 @@ -package org.gotson.komga.interfaces.rest.persistence +package org.gotson.komga.interfaces.api.persistence import org.gotson.komga.domain.model.BookSearchWithReadProgress -import org.gotson.komga.interfaces.rest.dto.BookDto +import org.gotson.komga.interfaces.api.rest.dto.BookDto import org.springframework.data.domain.Page import org.springframework.data.domain.Pageable diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/persistence/ReadProgressDtoRepository.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/persistence/ReadProgressDtoRepository.kt similarity index 61% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/persistence/ReadProgressDtoRepository.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/persistence/ReadProgressDtoRepository.kt index 9d08b34ad..f1a58ce76 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/persistence/ReadProgressDtoRepository.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/persistence/ReadProgressDtoRepository.kt @@ -1,7 +1,7 @@ -package org.gotson.komga.interfaces.rest.persistence +package org.gotson.komga.interfaces.api.persistence -import org.gotson.komga.interfaces.rest.dto.TachiyomiReadProgressDto -import org.gotson.komga.interfaces.rest.dto.TachiyomiReadProgressV2Dto +import org.gotson.komga.interfaces.api.rest.dto.TachiyomiReadProgressDto +import org.gotson.komga.interfaces.api.rest.dto.TachiyomiReadProgressV2Dto interface ReadProgressDtoRepository { fun findProgressBySeries(seriesId: String, userId: String,): TachiyomiReadProgressDto diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/persistence/SeriesDtoRepository.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/persistence/SeriesDtoRepository.kt similarity index 80% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/persistence/SeriesDtoRepository.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/persistence/SeriesDtoRepository.kt index dd794526d..ee6f2720a 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/persistence/SeriesDtoRepository.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/persistence/SeriesDtoRepository.kt @@ -1,8 +1,8 @@ -package org.gotson.komga.interfaces.rest.persistence +package org.gotson.komga.interfaces.api.persistence import org.gotson.komga.domain.model.SeriesSearchWithReadProgress -import org.gotson.komga.interfaces.rest.dto.GroupCountDto -import org.gotson.komga.interfaces.rest.dto.SeriesDto +import org.gotson.komga.interfaces.api.rest.dto.GroupCountDto +import org.gotson.komga.interfaces.api.rest.dto.SeriesDto import org.springframework.data.domain.Page import org.springframework.data.domain.Pageable diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/BookController.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/BookController.kt similarity index 97% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/BookController.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/BookController.kt index 292dd7119..3163f906d 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/BookController.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/BookController.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest +package org.gotson.komga.interfaces.api.rest import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter @@ -33,17 +33,17 @@ import org.gotson.komga.infrastructure.swagger.PageableAsQueryParam import org.gotson.komga.infrastructure.swagger.PageableWithoutSortAsQueryParam import org.gotson.komga.infrastructure.web.getMediaTypeOrDefault import org.gotson.komga.infrastructure.web.setCachePrivate -import org.gotson.komga.interfaces.opds.MARK_READ -import org.gotson.komga.interfaces.rest.dto.BookDto -import org.gotson.komga.interfaces.rest.dto.BookImportBatchDto -import org.gotson.komga.interfaces.rest.dto.BookMetadataUpdateDto -import org.gotson.komga.interfaces.rest.dto.PageDto -import org.gotson.komga.interfaces.rest.dto.ReadListDto -import org.gotson.komga.interfaces.rest.dto.ReadProgressUpdateDto -import org.gotson.komga.interfaces.rest.dto.patch -import org.gotson.komga.interfaces.rest.dto.restrictUrl -import org.gotson.komga.interfaces.rest.dto.toDto -import org.gotson.komga.interfaces.rest.persistence.BookDtoRepository +import org.gotson.komga.interfaces.api.MARK_READ +import org.gotson.komga.interfaces.api.persistence.BookDtoRepository +import org.gotson.komga.interfaces.api.rest.dto.BookDto +import org.gotson.komga.interfaces.api.rest.dto.BookImportBatchDto +import org.gotson.komga.interfaces.api.rest.dto.BookMetadataUpdateDto +import org.gotson.komga.interfaces.api.rest.dto.PageDto +import org.gotson.komga.interfaces.api.rest.dto.ReadListDto +import org.gotson.komga.interfaces.api.rest.dto.ReadProgressUpdateDto +import org.gotson.komga.interfaces.api.rest.dto.patch +import org.gotson.komga.interfaces.api.rest.dto.restrictUrl +import org.gotson.komga.interfaces.api.rest.dto.toDto import org.springframework.core.io.FileSystemResource import org.springframework.data.domain.Page import org.springframework.data.domain.PageRequest diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/ClaimController.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/ClaimController.kt similarity index 90% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/ClaimController.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/ClaimController.kt index 132ac95f4..861ae3d95 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/ClaimController.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/ClaimController.kt @@ -1,9 +1,9 @@ -package org.gotson.komga.interfaces.rest +package org.gotson.komga.interfaces.api.rest import org.gotson.komga.domain.model.KomgaUser import org.gotson.komga.domain.service.KomgaUserLifecycle -import org.gotson.komga.interfaces.rest.dto.UserDto -import org.gotson.komga.interfaces.rest.dto.toDto +import org.gotson.komga.interfaces.api.rest.dto.UserDto +import org.gotson.komga.interfaces.api.rest.dto.toDto import org.springframework.http.HttpStatus import org.springframework.http.MediaType import org.springframework.validation.annotation.Validated diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/ErrorHandlingControllerAdvice.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/ErrorHandlingControllerAdvice.kt similarity index 96% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/ErrorHandlingControllerAdvice.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/ErrorHandlingControllerAdvice.kt index 9a8201e93..0b3c63f8b 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/ErrorHandlingControllerAdvice.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/ErrorHandlingControllerAdvice.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest +package org.gotson.komga.interfaces.api.rest import org.springframework.http.HttpStatus import org.springframework.web.bind.MethodArgumentNotValidException diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/FileSystemController.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/FileSystemController.kt similarity index 98% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/FileSystemController.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/FileSystemController.kt index 1399b9702..6a6196484 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/FileSystemController.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/FileSystemController.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest +package org.gotson.komga.interfaces.api.rest import com.fasterxml.jackson.annotation.JsonInclude import org.springframework.http.HttpStatus diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/LibraryController.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/LibraryController.kt similarity index 95% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/LibraryController.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/LibraryController.kt index e7b144a63..a3ec817e5 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/LibraryController.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/LibraryController.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest +package org.gotson.komga.interfaces.api.rest import org.gotson.komga.application.tasks.HIGH_PRIORITY import org.gotson.komga.application.tasks.TaskReceiver @@ -13,11 +13,11 @@ import org.gotson.komga.domain.persistence.SeriesRepository import org.gotson.komga.domain.service.LibraryLifecycle import org.gotson.komga.infrastructure.security.KomgaPrincipal import org.gotson.komga.infrastructure.web.filePathToUrl -import org.gotson.komga.interfaces.rest.dto.LibraryCreationDto -import org.gotson.komga.interfaces.rest.dto.LibraryDto -import org.gotson.komga.interfaces.rest.dto.LibraryUpdateDto -import org.gotson.komga.interfaces.rest.dto.toDomain -import org.gotson.komga.interfaces.rest.dto.toDto +import org.gotson.komga.interfaces.api.rest.dto.LibraryCreationDto +import org.gotson.komga.interfaces.api.rest.dto.LibraryDto +import org.gotson.komga.interfaces.api.rest.dto.LibraryUpdateDto +import org.gotson.komga.interfaces.api.rest.dto.toDomain +import org.gotson.komga.interfaces.api.rest.dto.toDto import org.springframework.http.HttpStatus import org.springframework.http.MediaType import org.springframework.security.access.prepost.PreAuthorize diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/LoginController.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/LoginController.kt similarity index 95% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/LoginController.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/LoginController.kt index 5ea8242da..57e226a95 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/LoginController.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/LoginController.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest +package org.gotson.komga.interfaces.api.rest import org.springframework.http.HttpStatus import org.springframework.http.MediaType diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/OAuth2Controller.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/OAuth2Controller.kt similarity index 94% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/OAuth2Controller.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/OAuth2Controller.kt index 62489d50a..1494de631 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/OAuth2Controller.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/OAuth2Controller.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest +package org.gotson.komga.interfaces.api.rest import org.springframework.http.MediaType import org.springframework.security.oauth2.client.registration.InMemoryClientRegistrationRepository diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/ReadListController.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/ReadListController.kt similarity index 94% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/ReadListController.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/ReadListController.kt index 49e286433..5c6c32a43 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/ReadListController.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/ReadListController.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest +package org.gotson.komga.interfaces.api.rest import io.swagger.v3.oas.annotations.Parameter import io.swagger.v3.oas.annotations.media.Content @@ -26,17 +26,17 @@ import org.gotson.komga.infrastructure.security.KomgaPrincipal import org.gotson.komga.infrastructure.swagger.AuthorsAsQueryParam import org.gotson.komga.infrastructure.swagger.PageableWithoutSortAsQueryParam import org.gotson.komga.infrastructure.web.Authors -import org.gotson.komga.interfaces.rest.dto.BookDto -import org.gotson.komga.interfaces.rest.dto.ReadListCreationDto -import org.gotson.komga.interfaces.rest.dto.ReadListDto -import org.gotson.komga.interfaces.rest.dto.ReadListRequestResultDto -import org.gotson.komga.interfaces.rest.dto.ReadListUpdateDto -import org.gotson.komga.interfaces.rest.dto.TachiyomiReadProgressDto -import org.gotson.komga.interfaces.rest.dto.TachiyomiReadProgressUpdateDto -import org.gotson.komga.interfaces.rest.dto.restrictUrl -import org.gotson.komga.interfaces.rest.dto.toDto -import org.gotson.komga.interfaces.rest.persistence.BookDtoRepository -import org.gotson.komga.interfaces.rest.persistence.ReadProgressDtoRepository +import org.gotson.komga.interfaces.api.persistence.BookDtoRepository +import org.gotson.komga.interfaces.api.persistence.ReadProgressDtoRepository +import org.gotson.komga.interfaces.api.rest.dto.BookDto +import org.gotson.komga.interfaces.api.rest.dto.ReadListCreationDto +import org.gotson.komga.interfaces.api.rest.dto.ReadListDto +import org.gotson.komga.interfaces.api.rest.dto.ReadListRequestResultDto +import org.gotson.komga.interfaces.api.rest.dto.ReadListUpdateDto +import org.gotson.komga.interfaces.api.rest.dto.TachiyomiReadProgressDto +import org.gotson.komga.interfaces.api.rest.dto.TachiyomiReadProgressUpdateDto +import org.gotson.komga.interfaces.api.rest.dto.restrictUrl +import org.gotson.komga.interfaces.api.rest.dto.toDto import org.springframework.core.io.FileSystemResource import org.springframework.data.domain.Page import org.springframework.data.domain.PageRequest diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/ReferentialController.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/ReferentialController.kt similarity index 98% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/ReferentialController.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/ReferentialController.kt index fe3129948..a90adaf9c 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/ReferentialController.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/ReferentialController.kt @@ -1,11 +1,11 @@ -package org.gotson.komga.interfaces.rest +package org.gotson.komga.interfaces.api.rest import io.swagger.v3.oas.annotations.Parameter import org.gotson.komga.domain.persistence.ReferentialRepository import org.gotson.komga.infrastructure.security.KomgaPrincipal import org.gotson.komga.infrastructure.swagger.PageableWithoutSortAsQueryParam -import org.gotson.komga.interfaces.rest.dto.AuthorDto -import org.gotson.komga.interfaces.rest.dto.toDto +import org.gotson.komga.interfaces.api.rest.dto.AuthorDto +import org.gotson.komga.interfaces.api.rest.dto.toDto import org.springframework.data.domain.Page import org.springframework.data.domain.PageRequest import org.springframework.data.domain.Pageable diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/SeriesCollectionController.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesCollectionController.kt similarity index 94% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/SeriesCollectionController.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesCollectionController.kt index b3639d5a5..498933e54 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/SeriesCollectionController.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesCollectionController.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest +package org.gotson.komga.interfaces.api.rest import io.swagger.v3.oas.annotations.Parameter import io.swagger.v3.oas.annotations.media.Content @@ -19,13 +19,13 @@ import org.gotson.komga.infrastructure.security.KomgaPrincipal import org.gotson.komga.infrastructure.swagger.AuthorsAsQueryParam import org.gotson.komga.infrastructure.swagger.PageableWithoutSortAsQueryParam import org.gotson.komga.infrastructure.web.Authors -import org.gotson.komga.interfaces.rest.dto.CollectionCreationDto -import org.gotson.komga.interfaces.rest.dto.CollectionDto -import org.gotson.komga.interfaces.rest.dto.CollectionUpdateDto -import org.gotson.komga.interfaces.rest.dto.SeriesDto -import org.gotson.komga.interfaces.rest.dto.restrictUrl -import org.gotson.komga.interfaces.rest.dto.toDto -import org.gotson.komga.interfaces.rest.persistence.SeriesDtoRepository +import org.gotson.komga.interfaces.api.persistence.SeriesDtoRepository +import org.gotson.komga.interfaces.api.rest.dto.CollectionCreationDto +import org.gotson.komga.interfaces.api.rest.dto.CollectionDto +import org.gotson.komga.interfaces.api.rest.dto.CollectionUpdateDto +import org.gotson.komga.interfaces.api.rest.dto.SeriesDto +import org.gotson.komga.interfaces.api.rest.dto.restrictUrl +import org.gotson.komga.interfaces.api.rest.dto.toDto import org.springframework.data.domain.Page import org.springframework.data.domain.PageRequest import org.springframework.data.domain.Pageable diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/SeriesController.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt similarity index 96% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/SeriesController.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt index e6c4102f4..830522fc6 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/SeriesController.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest +package org.gotson.komga.interfaces.api.rest import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter @@ -41,21 +41,21 @@ import org.gotson.komga.infrastructure.swagger.PageableAsQueryParam import org.gotson.komga.infrastructure.swagger.PageableWithoutSortAsQueryParam import org.gotson.komga.infrastructure.web.Authors import org.gotson.komga.infrastructure.web.DelimitedPair -import org.gotson.komga.interfaces.rest.dto.BookDto -import org.gotson.komga.interfaces.rest.dto.CollectionDto -import org.gotson.komga.interfaces.rest.dto.GroupCountDto -import org.gotson.komga.interfaces.rest.dto.SeriesDto -import org.gotson.komga.interfaces.rest.dto.SeriesMetadataUpdateDto -import org.gotson.komga.interfaces.rest.dto.SeriesThumbnailDto -import org.gotson.komga.interfaces.rest.dto.TachiyomiReadProgressDto -import org.gotson.komga.interfaces.rest.dto.TachiyomiReadProgressUpdateDto -import org.gotson.komga.interfaces.rest.dto.TachiyomiReadProgressUpdateV2Dto -import org.gotson.komga.interfaces.rest.dto.TachiyomiReadProgressV2Dto -import org.gotson.komga.interfaces.rest.dto.restrictUrl -import org.gotson.komga.interfaces.rest.dto.toDto -import org.gotson.komga.interfaces.rest.persistence.BookDtoRepository -import org.gotson.komga.interfaces.rest.persistence.ReadProgressDtoRepository -import org.gotson.komga.interfaces.rest.persistence.SeriesDtoRepository +import org.gotson.komga.interfaces.api.persistence.BookDtoRepository +import org.gotson.komga.interfaces.api.persistence.ReadProgressDtoRepository +import org.gotson.komga.interfaces.api.persistence.SeriesDtoRepository +import org.gotson.komga.interfaces.api.rest.dto.BookDto +import org.gotson.komga.interfaces.api.rest.dto.CollectionDto +import org.gotson.komga.interfaces.api.rest.dto.GroupCountDto +import org.gotson.komga.interfaces.api.rest.dto.SeriesDto +import org.gotson.komga.interfaces.api.rest.dto.SeriesMetadataUpdateDto +import org.gotson.komga.interfaces.api.rest.dto.SeriesThumbnailDto +import org.gotson.komga.interfaces.api.rest.dto.TachiyomiReadProgressDto +import org.gotson.komga.interfaces.api.rest.dto.TachiyomiReadProgressUpdateDto +import org.gotson.komga.interfaces.api.rest.dto.TachiyomiReadProgressUpdateV2Dto +import org.gotson.komga.interfaces.api.rest.dto.TachiyomiReadProgressV2Dto +import org.gotson.komga.interfaces.api.rest.dto.restrictUrl +import org.gotson.komga.interfaces.api.rest.dto.toDto import org.springframework.core.io.FileSystemResource import org.springframework.data.domain.Page import org.springframework.data.domain.PageRequest diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/TaskController.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/TaskController.kt similarity index 94% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/TaskController.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/TaskController.kt index 9722ec53f..6a5ba6d7a 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/TaskController.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/TaskController.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest +package org.gotson.komga.interfaces.api.rest import org.gotson.komga.domain.model.ROLE_ADMIN import org.gotson.komga.infrastructure.jms.JmsQueueLifecycle diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/TransientBooksController.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/TransientBooksController.kt similarity index 97% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/TransientBooksController.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/TransientBooksController.kt index 8d8c0b13e..be85e1ac6 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/TransientBooksController.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/TransientBooksController.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest +package org.gotson.komga.interfaces.api.rest import com.jakewharton.byteunits.BinaryByteUnit import mu.KotlinLogging @@ -10,7 +10,7 @@ import org.gotson.komga.domain.persistence.TransientBookRepository import org.gotson.komga.domain.service.TransientBookLifecycle import org.gotson.komga.infrastructure.web.getMediaTypeOrDefault import org.gotson.komga.infrastructure.web.toFilePath -import org.gotson.komga.interfaces.rest.dto.PageDto +import org.gotson.komga.interfaces.api.rest.dto.PageDto import org.springframework.http.HttpStatus import org.springframework.http.MediaType import org.springframework.http.ResponseEntity diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/UserController.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/UserController.kt similarity index 92% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/UserController.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/UserController.kt index afdc3d5b9..809e8fcc0 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/UserController.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/UserController.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest +package org.gotson.komga.interfaces.api.rest import io.swagger.v3.oas.annotations.Parameter import mu.KotlinLogging @@ -12,15 +12,15 @@ import org.gotson.komga.domain.persistence.LibraryRepository import org.gotson.komga.domain.service.KomgaUserLifecycle import org.gotson.komga.infrastructure.jooq.UnpagedSorted import org.gotson.komga.infrastructure.security.KomgaPrincipal -import org.gotson.komga.interfaces.rest.dto.AuthenticationActivityDto -import org.gotson.komga.interfaces.rest.dto.PasswordUpdateDto -import org.gotson.komga.interfaces.rest.dto.RolesUpdateDto -import org.gotson.komga.interfaces.rest.dto.SharedLibrariesUpdateDto -import org.gotson.komga.interfaces.rest.dto.UserCreationDto -import org.gotson.komga.interfaces.rest.dto.UserDto -import org.gotson.komga.interfaces.rest.dto.UserWithSharedLibrariesDto -import org.gotson.komga.interfaces.rest.dto.toDto -import org.gotson.komga.interfaces.rest.dto.toWithSharedLibrariesDto +import org.gotson.komga.interfaces.api.rest.dto.AuthenticationActivityDto +import org.gotson.komga.interfaces.api.rest.dto.PasswordUpdateDto +import org.gotson.komga.interfaces.api.rest.dto.RolesUpdateDto +import org.gotson.komga.interfaces.api.rest.dto.SharedLibrariesUpdateDto +import org.gotson.komga.interfaces.api.rest.dto.UserCreationDto +import org.gotson.komga.interfaces.api.rest.dto.UserDto +import org.gotson.komga.interfaces.api.rest.dto.UserWithSharedLibrariesDto +import org.gotson.komga.interfaces.api.rest.dto.toDto +import org.gotson.komga.interfaces.api.rest.dto.toWithSharedLibrariesDto import org.springdoc.core.converters.models.PageableAsQueryParam import org.springframework.core.env.Environment import org.springframework.data.domain.Page diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/AuthenticationActivityDto.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/AuthenticationActivityDto.kt similarity index 93% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/AuthenticationActivityDto.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/AuthenticationActivityDto.kt index bdc7fb58e..78471fb65 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/AuthenticationActivityDto.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/AuthenticationActivityDto.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest.dto +package org.gotson.komga.interfaces.api.rest.dto import com.fasterxml.jackson.annotation.JsonFormat import org.gotson.komga.domain.model.AuthenticationActivity diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/AuthorDto.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/AuthorDto.kt similarity index 75% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/AuthorDto.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/AuthorDto.kt index 016f1fa64..69677c976 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/AuthorDto.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/AuthorDto.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest.dto +package org.gotson.komga.interfaces.api.rest.dto import org.gotson.komga.domain.model.Author diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/BookDto.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/BookDto.kt similarity index 97% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/BookDto.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/BookDto.kt index 35a8563bf..1f84ee61d 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/BookDto.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/BookDto.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest.dto +package org.gotson.komga.interfaces.api.rest.dto import com.fasterxml.jackson.annotation.JsonFormat import com.jakewharton.byteunits.BinaryByteUnit diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/BookImportBatchDto.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/BookImportBatchDto.kt similarity index 86% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/BookImportBatchDto.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/BookImportBatchDto.kt index 1b5c48fa2..53cf6b1d1 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/BookImportBatchDto.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/BookImportBatchDto.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest.dto +package org.gotson.komga.interfaces.api.rest.dto import org.gotson.komga.domain.model.CopyMode diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/BookMetadataUpdateDto.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/BookMetadataUpdateDto.kt similarity index 98% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/BookMetadataUpdateDto.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/BookMetadataUpdateDto.kt index 10e786f2a..67738b51d 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/BookMetadataUpdateDto.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/BookMetadataUpdateDto.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest.dto +package org.gotson.komga.interfaces.api.rest.dto import org.gotson.komga.domain.model.Author import org.gotson.komga.domain.model.BookMetadata diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/CollectionCreationDto.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/CollectionCreationDto.kt similarity index 86% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/CollectionCreationDto.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/CollectionCreationDto.kt index 35b9dffd5..cd6d4a612 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/CollectionCreationDto.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/CollectionCreationDto.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest.dto +package org.gotson.komga.interfaces.api.rest.dto import org.hibernate.validator.constraints.UniqueElements import javax.validation.constraints.NotBlank diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/CollectionDto.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/CollectionDto.kt similarity index 87% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/CollectionDto.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/CollectionDto.kt index 378a0a04c..4d07128ca 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/CollectionDto.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/CollectionDto.kt @@ -1,7 +1,8 @@ -package org.gotson.komga.interfaces.rest.dto +package org.gotson.komga.interfaces.api.rest.dto import com.fasterxml.jackson.annotation.JsonFormat import org.gotson.komga.domain.model.SeriesCollection +import org.gotson.komga.infrastructure.language.toUTC import java.time.LocalDateTime data class CollectionDto( diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/CollectionUpdateDto.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/CollectionUpdateDto.kt similarity index 88% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/CollectionUpdateDto.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/CollectionUpdateDto.kt index 240fbc6e0..908586244 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/CollectionUpdateDto.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/CollectionUpdateDto.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest.dto +package org.gotson.komga.interfaces.api.rest.dto import org.gotson.komga.infrastructure.validation.NullOrNotBlank import org.gotson.komga.infrastructure.validation.NullOrNotEmpty diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/GroupCountDto.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/GroupCountDto.kt similarity index 58% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/GroupCountDto.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/GroupCountDto.kt index f8fc373bf..2fa2066c1 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/GroupCountDto.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/GroupCountDto.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest.dto +package org.gotson.komga.interfaces.api.rest.dto data class GroupCountDto( val group: String, diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/LibraryCreationDto.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/LibraryCreationDto.kt similarity index 94% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/LibraryCreationDto.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/LibraryCreationDto.kt index 40be691e8..d49e22cda 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/LibraryCreationDto.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/LibraryCreationDto.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest.dto +package org.gotson.komga.interfaces.api.rest.dto import javax.validation.constraints.NotBlank diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/LibraryDto.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/LibraryDto.kt similarity index 96% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/LibraryDto.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/LibraryDto.kt index ec8b9924d..a19d0b6a8 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/LibraryDto.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/LibraryDto.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest.dto +package org.gotson.komga.interfaces.api.rest.dto import org.gotson.komga.domain.model.Library import org.gotson.komga.infrastructure.web.toFilePath diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/LibraryUpdateDto.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/LibraryUpdateDto.kt similarity index 93% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/LibraryUpdateDto.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/LibraryUpdateDto.kt index 6ad8fd3d0..5aabaee3d 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/LibraryUpdateDto.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/LibraryUpdateDto.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest.dto +package org.gotson.komga.interfaces.api.rest.dto import javax.validation.constraints.NotBlank diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/PageDto.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/PageDto.kt similarity index 72% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/PageDto.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/PageDto.kt index 1195ccc1c..c4eafef71 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/PageDto.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/PageDto.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest.dto +package org.gotson.komga.interfaces.api.rest.dto data class PageDto( val number: Int, diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/ReadListCreationDto.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/ReadListCreationDto.kt similarity index 86% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/ReadListCreationDto.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/ReadListCreationDto.kt index 24455742f..f3777ff9d 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/ReadListCreationDto.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/ReadListCreationDto.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest.dto +package org.gotson.komga.interfaces.api.rest.dto import org.hibernate.validator.constraints.UniqueElements import javax.validation.constraints.NotBlank diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/ReadListDto.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/ReadListDto.kt similarity index 87% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/ReadListDto.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/ReadListDto.kt index 9608268e5..e3e788857 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/ReadListDto.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/ReadListDto.kt @@ -1,7 +1,8 @@ -package org.gotson.komga.interfaces.rest.dto +package org.gotson.komga.interfaces.api.rest.dto import com.fasterxml.jackson.annotation.JsonFormat import org.gotson.komga.domain.model.ReadList +import org.gotson.komga.infrastructure.language.toUTC import java.time.LocalDateTime data class ReadListDto( diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/ReadListRequestResultDto.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/ReadListRequestResultDto.kt similarity index 95% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/ReadListRequestResultDto.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/ReadListRequestResultDto.kt index dc6ce93e9..743fde090 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/ReadListRequestResultDto.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/ReadListRequestResultDto.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest.dto +package org.gotson.komga.interfaces.api.rest.dto import org.gotson.komga.domain.model.ReadListRequestBook import org.gotson.komga.domain.model.ReadListRequestResult diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/ReadListUpdateDto.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/ReadListUpdateDto.kt similarity index 87% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/ReadListUpdateDto.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/ReadListUpdateDto.kt index 33a42c04e..d506d14df 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/ReadListUpdateDto.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/ReadListUpdateDto.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest.dto +package org.gotson.komga.interfaces.api.rest.dto import org.gotson.komga.infrastructure.validation.NullOrNotBlank import org.gotson.komga.infrastructure.validation.NullOrNotEmpty diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/ReadProgressUpdateDto.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/ReadProgressUpdateDto.kt similarity index 95% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/ReadProgressUpdateDto.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/ReadProgressUpdateDto.kt index 55f258263..8f9315c30 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/ReadProgressUpdateDto.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/ReadProgressUpdateDto.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest.dto +package org.gotson.komga.interfaces.api.rest.dto import javax.validation.Constraint import javax.validation.ConstraintValidator diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/SeriesCoverDto.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/SeriesCoverDto.kt similarity index 94% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/SeriesCoverDto.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/SeriesCoverDto.kt index 713267070..12f855c14 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/SeriesCoverDto.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/SeriesCoverDto.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest.dto +package org.gotson.komga.interfaces.api.rest.dto import org.gotson.komga.domain.model.Library diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/SeriesDto.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/SeriesDto.kt similarity index 97% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/SeriesDto.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/SeriesDto.kt index 69062d344..4649c2645 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/SeriesDto.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/SeriesDto.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest.dto +package org.gotson.komga.interfaces.api.rest.dto import com.fasterxml.jackson.annotation.JsonFormat import java.time.LocalDate diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/SeriesMetadataUpdateDto.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/SeriesMetadataUpdateDto.kt similarity index 97% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/SeriesMetadataUpdateDto.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/SeriesMetadataUpdateDto.kt index 750eeff97..7dbe972e8 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/SeriesMetadataUpdateDto.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/SeriesMetadataUpdateDto.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest.dto +package org.gotson.komga.interfaces.api.rest.dto import org.gotson.komga.domain.model.SeriesMetadata import org.gotson.komga.infrastructure.validation.NullOrBlankOrBCP47 diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/SeriesThumbnailDto.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/SeriesThumbnailDto.kt similarity index 86% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/SeriesThumbnailDto.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/SeriesThumbnailDto.kt index a405156d3..48249e187 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/SeriesThumbnailDto.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/SeriesThumbnailDto.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest.dto +package org.gotson.komga.interfaces.api.rest.dto import org.gotson.komga.domain.model.ThumbnailSeries diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/TachiyomiReadProgressDto.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/TachiyomiReadProgressDto.kt similarity index 79% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/TachiyomiReadProgressDto.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/TachiyomiReadProgressDto.kt index 5f085fb9e..791d22168 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/TachiyomiReadProgressDto.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/TachiyomiReadProgressDto.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest.dto +package org.gotson.komga.interfaces.api.rest.dto data class TachiyomiReadProgressDto( val booksCount: Int, diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/TachiyomiReadProgressUpdateDto.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/TachiyomiReadProgressUpdateDto.kt similarity index 82% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/TachiyomiReadProgressUpdateDto.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/TachiyomiReadProgressUpdateDto.kt index 139e4b2ec..fec7cba40 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/TachiyomiReadProgressUpdateDto.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/TachiyomiReadProgressUpdateDto.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest.dto +package org.gotson.komga.interfaces.api.rest.dto import javax.validation.constraints.PositiveOrZero diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/TachiyomiReadProgressV2Dto.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/TachiyomiReadProgressV2Dto.kt similarity index 82% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/TachiyomiReadProgressV2Dto.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/TachiyomiReadProgressV2Dto.kt index d5cc7e6b4..684196248 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/TachiyomiReadProgressV2Dto.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/TachiyomiReadProgressV2Dto.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest.dto +package org.gotson.komga.interfaces.api.rest.dto data class TachiyomiReadProgressV2Dto( val booksCount: Int, diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/UserDto.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/UserDto.kt similarity index 97% rename from komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/UserDto.kt rename to komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/UserDto.kt index 88f9e1737..9b09cdf8f 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/UserDto.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/UserDto.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest.dto +package org.gotson.komga.interfaces.api.rest.dto import org.gotson.komga.domain.model.KomgaUser import org.gotson.komga.domain.model.ROLE_ADMIN diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/Utils.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/Utils.kt deleted file mode 100644 index c8a506676..000000000 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/rest/dto/Utils.kt +++ /dev/null @@ -1,8 +0,0 @@ -package org.gotson.komga.interfaces.rest.dto - -import java.time.LocalDateTime -import java.time.ZoneId -import java.time.ZoneOffset - -fun LocalDateTime.toUTC(): LocalDateTime = - atZone(ZoneId.systemDefault()).withZoneSameInstant(ZoneOffset.UTC).toLocalDateTime() diff --git a/komga/src/test/kotlin/org/gotson/komga/domain/service/LibraryContentLifecycleTest.kt b/komga/src/test/kotlin/org/gotson/komga/domain/service/LibraryContentLifecycleTest.kt index 2c03d33e3..60e5fe23e 100644 --- a/komga/src/test/kotlin/org/gotson/komga/domain/service/LibraryContentLifecycleTest.kt +++ b/komga/src/test/kotlin/org/gotson/komga/domain/service/LibraryContentLifecycleTest.kt @@ -36,7 +36,7 @@ import org.gotson.komga.domain.persistence.SeriesRepository import org.gotson.komga.domain.persistence.ThumbnailBookRepository import org.gotson.komga.infrastructure.hash.Hasher import org.gotson.komga.infrastructure.language.toIndexedMap -import org.gotson.komga.interfaces.rest.persistence.SeriesDtoRepository +import org.gotson.komga.interfaces.api.persistence.SeriesDtoRepository import org.junit.jupiter.api.AfterAll import org.junit.jupiter.api.AfterEach import org.junit.jupiter.api.BeforeAll diff --git a/komga/src/test/kotlin/org/gotson/komga/interfaces/opds/OpdsControllerTest.kt b/komga/src/test/kotlin/org/gotson/komga/interfaces/api/opds/OpdsControllerTest.kt similarity index 98% rename from komga/src/test/kotlin/org/gotson/komga/interfaces/opds/OpdsControllerTest.kt rename to komga/src/test/kotlin/org/gotson/komga/interfaces/api/opds/OpdsControllerTest.kt index 67fa65fe6..912daa25b 100644 --- a/komga/src/test/kotlin/org/gotson/komga/interfaces/opds/OpdsControllerTest.kt +++ b/komga/src/test/kotlin/org/gotson/komga/interfaces/api/opds/OpdsControllerTest.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.opds +package org.gotson.komga.interfaces.api.opds import org.gotson.komga.domain.model.BookPage import org.gotson.komga.domain.model.KomgaUser @@ -15,7 +15,7 @@ import org.gotson.komga.domain.persistence.SeriesRepository import org.gotson.komga.domain.service.KomgaUserLifecycle import org.gotson.komga.domain.service.LibraryLifecycle import org.gotson.komga.domain.service.SeriesLifecycle -import org.gotson.komga.interfaces.rest.WithMockCustomUser +import org.gotson.komga.interfaces.api.rest.WithMockCustomUser import org.hamcrest.Matchers import org.junit.jupiter.api.AfterAll import org.junit.jupiter.api.AfterEach diff --git a/komga/src/test/kotlin/org/gotson/komga/interfaces/rest/BookControllerTest.kt b/komga/src/test/kotlin/org/gotson/komga/interfaces/api/rest/BookControllerTest.kt similarity index 99% rename from komga/src/test/kotlin/org/gotson/komga/interfaces/rest/BookControllerTest.kt rename to komga/src/test/kotlin/org/gotson/komga/interfaces/api/rest/BookControllerTest.kt index 6fa422dca..8b2764512 100644 --- a/komga/src/test/kotlin/org/gotson/komga/interfaces/rest/BookControllerTest.kt +++ b/komga/src/test/kotlin/org/gotson/komga/interfaces/api/rest/BookControllerTest.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest +package org.gotson.komga.interfaces.api.rest import org.assertj.core.api.Assertions.assertThat import org.assertj.core.groups.Tuple.tuple diff --git a/komga/src/test/kotlin/org/gotson/komga/interfaces/rest/ClaimControllerTest.kt b/komga/src/test/kotlin/org/gotson/komga/interfaces/api/rest/ClaimControllerTest.kt similarity index 96% rename from komga/src/test/kotlin/org/gotson/komga/interfaces/rest/ClaimControllerTest.kt rename to komga/src/test/kotlin/org/gotson/komga/interfaces/api/rest/ClaimControllerTest.kt index 367581580..0ad473ab8 100644 --- a/komga/src/test/kotlin/org/gotson/komga/interfaces/rest/ClaimControllerTest.kt +++ b/komga/src/test/kotlin/org/gotson/komga/interfaces/api/rest/ClaimControllerTest.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest +package org.gotson.komga.interfaces.api.rest import org.junit.jupiter.api.extension.ExtendWith import org.junit.jupiter.params.ParameterizedTest diff --git a/komga/src/test/kotlin/org/gotson/komga/interfaces/rest/FileSystemControllerTest.kt b/komga/src/test/kotlin/org/gotson/komga/interfaces/api/rest/FileSystemControllerTest.kt similarity index 97% rename from komga/src/test/kotlin/org/gotson/komga/interfaces/rest/FileSystemControllerTest.kt rename to komga/src/test/kotlin/org/gotson/komga/interfaces/api/rest/FileSystemControllerTest.kt index d30c50bb3..3b6b79c3f 100644 --- a/komga/src/test/kotlin/org/gotson/komga/interfaces/rest/FileSystemControllerTest.kt +++ b/komga/src/test/kotlin/org/gotson/komga/interfaces/api/rest/FileSystemControllerTest.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest +package org.gotson.komga.interfaces.api.rest import org.gotson.komga.domain.model.ROLE_ADMIN import org.gotson.komga.domain.model.ROLE_USER diff --git a/komga/src/test/kotlin/org/gotson/komga/interfaces/rest/LibraryControllerTest.kt b/komga/src/test/kotlin/org/gotson/komga/interfaces/api/rest/LibraryControllerTest.kt similarity index 98% rename from komga/src/test/kotlin/org/gotson/komga/interfaces/rest/LibraryControllerTest.kt rename to komga/src/test/kotlin/org/gotson/komga/interfaces/api/rest/LibraryControllerTest.kt index 76cab10ad..94b97746f 100644 --- a/komga/src/test/kotlin/org/gotson/komga/interfaces/rest/LibraryControllerTest.kt +++ b/komga/src/test/kotlin/org/gotson/komga/interfaces/api/rest/LibraryControllerTest.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest +package org.gotson.komga.interfaces.api.rest import org.gotson.komga.domain.model.ROLE_ADMIN import org.gotson.komga.domain.model.ROLE_USER diff --git a/komga/src/test/kotlin/org/gotson/komga/interfaces/rest/MockSpringSecurity.kt b/komga/src/test/kotlin/org/gotson/komga/interfaces/api/rest/MockSpringSecurity.kt similarity index 97% rename from komga/src/test/kotlin/org/gotson/komga/interfaces/rest/MockSpringSecurity.kt rename to komga/src/test/kotlin/org/gotson/komga/interfaces/api/rest/MockSpringSecurity.kt index 4aa49f49e..9b3cbbc14 100644 --- a/komga/src/test/kotlin/org/gotson/komga/interfaces/rest/MockSpringSecurity.kt +++ b/komga/src/test/kotlin/org/gotson/komga/interfaces/api/rest/MockSpringSecurity.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest +package org.gotson.komga.interfaces.api.rest import org.gotson.komga.domain.model.KomgaUser import org.gotson.komga.domain.model.ROLE_ADMIN diff --git a/komga/src/test/kotlin/org/gotson/komga/interfaces/rest/ReadListControllerTest.kt b/komga/src/test/kotlin/org/gotson/komga/interfaces/api/rest/ReadListControllerTest.kt similarity index 99% rename from komga/src/test/kotlin/org/gotson/komga/interfaces/rest/ReadListControllerTest.kt rename to komga/src/test/kotlin/org/gotson/komga/interfaces/api/rest/ReadListControllerTest.kt index 8b72447fd..7d2b0ba83 100644 --- a/komga/src/test/kotlin/org/gotson/komga/interfaces/rest/ReadListControllerTest.kt +++ b/komga/src/test/kotlin/org/gotson/komga/interfaces/api/rest/ReadListControllerTest.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest +package org.gotson.komga.interfaces.api.rest import org.gotson.komga.domain.model.Book import org.gotson.komga.domain.model.ROLE_ADMIN diff --git a/komga/src/test/kotlin/org/gotson/komga/interfaces/rest/SeriesCollectionControllerTest.kt b/komga/src/test/kotlin/org/gotson/komga/interfaces/api/rest/SeriesCollectionControllerTest.kt similarity index 99% rename from komga/src/test/kotlin/org/gotson/komga/interfaces/rest/SeriesCollectionControllerTest.kt rename to komga/src/test/kotlin/org/gotson/komga/interfaces/api/rest/SeriesCollectionControllerTest.kt index 84877284c..63ed30727 100644 --- a/komga/src/test/kotlin/org/gotson/komga/interfaces/rest/SeriesCollectionControllerTest.kt +++ b/komga/src/test/kotlin/org/gotson/komga/interfaces/api/rest/SeriesCollectionControllerTest.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest +package org.gotson.komga.interfaces.api.rest import org.gotson.komga.domain.model.ROLE_ADMIN import org.gotson.komga.domain.model.Series diff --git a/komga/src/test/kotlin/org/gotson/komga/interfaces/rest/SeriesControllerTest.kt b/komga/src/test/kotlin/org/gotson/komga/interfaces/api/rest/SeriesControllerTest.kt similarity index 99% rename from komga/src/test/kotlin/org/gotson/komga/interfaces/rest/SeriesControllerTest.kt rename to komga/src/test/kotlin/org/gotson/komga/interfaces/api/rest/SeriesControllerTest.kt index 1eed01ee6..8b64b5198 100644 --- a/komga/src/test/kotlin/org/gotson/komga/interfaces/rest/SeriesControllerTest.kt +++ b/komga/src/test/kotlin/org/gotson/komga/interfaces/api/rest/SeriesControllerTest.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest +package org.gotson.komga.interfaces.api.rest import org.assertj.core.api.Assertions.assertThat import org.gotson.komga.domain.model.BookPage diff --git a/komga/src/test/kotlin/org/gotson/komga/interfaces/rest/UserControllerDemoTest.kt b/komga/src/test/kotlin/org/gotson/komga/interfaces/api/rest/UserControllerDemoTest.kt similarity index 96% rename from komga/src/test/kotlin/org/gotson/komga/interfaces/rest/UserControllerDemoTest.kt rename to komga/src/test/kotlin/org/gotson/komga/interfaces/api/rest/UserControllerDemoTest.kt index cf1969fc2..038ff972f 100644 --- a/komga/src/test/kotlin/org/gotson/komga/interfaces/rest/UserControllerDemoTest.kt +++ b/komga/src/test/kotlin/org/gotson/komga/interfaces/api/rest/UserControllerDemoTest.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest +package org.gotson.komga.interfaces.api.rest import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith diff --git a/komga/src/test/kotlin/org/gotson/komga/interfaces/rest/UserControllerTest.kt b/komga/src/test/kotlin/org/gotson/komga/interfaces/api/rest/UserControllerTest.kt similarity index 96% rename from komga/src/test/kotlin/org/gotson/komga/interfaces/rest/UserControllerTest.kt rename to komga/src/test/kotlin/org/gotson/komga/interfaces/api/rest/UserControllerTest.kt index e50a0dfc5..1f84cbe00 100644 --- a/komga/src/test/kotlin/org/gotson/komga/interfaces/rest/UserControllerTest.kt +++ b/komga/src/test/kotlin/org/gotson/komga/interfaces/api/rest/UserControllerTest.kt @@ -1,4 +1,4 @@ -package org.gotson.komga.interfaces.rest +package org.gotson.komga.interfaces.api.rest import org.gotson.komga.domain.model.ROLE_ADMIN import org.junit.jupiter.api.extension.ExtendWith