From 2f58bdb381435b92959be9ca381e2b41eb87b5a5 Mon Sep 17 00:00:00 2001
From: Klaus <klaus@vividnext.co.kr>
Date: Wed, 11 Sep 2024 16:36:38 +0900
Subject: [PATCH 1/2] =?UTF-8?q?=EC=8B=9C=EB=A6=AC=EC=A6=88=20=EC=BD=98?=
 =?UTF-8?q?=ED=85=90=EC=B8=A0=20=EC=A0=95=EB=A0=AC=20-=20defaultValue=20?=
 =?UTF-8?q?=EB=8C=80=EC=8B=A0=20required=20=3D=20false=EB=A1=9C=20?=
 =?UTF-8?q?=EC=88=98=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../sodalive/content/series/ContentSeriesController.kt        | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/content/series/ContentSeriesController.kt b/src/main/kotlin/kr/co/vividnext/sodalive/content/series/ContentSeriesController.kt
index bdf74a5..43a5068 100644
--- a/src/main/kotlin/kr/co/vividnext/sodalive/content/series/ContentSeriesController.kt
+++ b/src/main/kotlin/kr/co/vividnext/sodalive/content/series/ContentSeriesController.kt
@@ -50,7 +50,7 @@ class ContentSeriesController(private val service: ContentSeriesService) {
     @GetMapping("/{id}/content")
     fun getSeriesContentList(
         @PathVariable id: Long,
-        @RequestParam("sortType", defaultValue = "NEWEST") sortType: SeriesSortType,
+        @RequestParam("sortType", required = false) sortType: SeriesSortType? = SeriesSortType.NEWEST,
         @AuthenticationPrincipal(expression = "#this == 'anonymousUser' ? null : member") member: Member?,
         pageable: Pageable
     ) = run {
@@ -60,7 +60,7 @@ class ContentSeriesController(private val service: ContentSeriesService) {
             service.getSeriesContentList(
                 seriesId = id,
                 member = member,
-                sortType = sortType,
+                sortType = sortType ?: SeriesSortType.NEWEST,
                 offset = pageable.offset,
                 limit = pageable.pageSize.toLong()
             )

From edb77d7ad78997483a837da48211668cb3d2fbc8 Mon Sep 17 00:00:00 2001
From: Klaus <klaus@vividnext.co.kr>
Date: Wed, 11 Sep 2024 16:41:25 +0900
Subject: [PATCH 2/2] =?UTF-8?q?required=20=3D=20false=20=EC=9D=B8=20?=
 =?UTF-8?q?=ED=8C=8C=EB=9D=BC=EB=AF=B8=ED=84=B0=20=EC=A0=84=EB=B6=80=20?=
 =?UTF-8?q?=EC=98=B5=EC=85=94=EB=84=90=20=ED=8C=8C=EB=9D=BC=EB=AF=B8?=
 =?UTF-8?q?=ED=84=B0=EB=A1=9C=20=EB=B3=80=EA=B2=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../sodalive/content/AudioContentController.kt         |  4 ++--
 .../main/curation/AudioContentCurationController.kt    |  4 ++--
 .../sodalive/content/series/ContentSeriesController.kt |  4 ++--
 .../content/theme/AudioContentThemeController.kt       |  4 ++--
 .../admin/signature/CreatorAdminSignatureController.kt | 10 ++++++++--
 5 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentController.kt b/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentController.kt
index f631261..750a882 100644
--- a/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentController.kt
+++ b/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentController.kt
@@ -104,7 +104,7 @@ class AudioContentController(private val service: AudioContentService) {
     @GetMapping
     fun getAudioContentList(
         @RequestParam("creator-id") creatorId: Long,
-        @RequestParam("sort-type", required = false) sortType: SortType = SortType.NEWEST,
+        @RequestParam("sort-type", required = false) sortType: SortType? = SortType.NEWEST,
         @RequestParam("category-id", required = false) categoryId: Long? = 0,
         @AuthenticationPrincipal(expression = "#this == 'anonymousUser' ? null : member") member: Member?,
         pageable: Pageable
@@ -114,7 +114,7 @@ class AudioContentController(private val service: AudioContentService) {
         ApiResponse.ok(
             service.getAudioContentList(
                 creatorId = creatorId,
-                sortType = sortType,
+                sortType = sortType ?: SortType.NEWEST,
                 categoryId = categoryId ?: 0,
                 member = member,
                 offset = pageable.offset,
diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/content/main/curation/AudioContentCurationController.kt b/src/main/kotlin/kr/co/vividnext/sodalive/content/main/curation/AudioContentCurationController.kt
index b3bae41..db94fb6 100644
--- a/src/main/kotlin/kr/co/vividnext/sodalive/content/main/curation/AudioContentCurationController.kt
+++ b/src/main/kotlin/kr/co/vividnext/sodalive/content/main/curation/AudioContentCurationController.kt
@@ -18,12 +18,12 @@ class AudioContentCurationController(private val service: AudioContentCurationSe
     @GetMapping("/{id}")
     fun getCurationContent(
         @PathVariable id: Long,
-        @RequestParam("sort-type", required = false) sortType: SortType = SortType.NEWEST,
+        @RequestParam("sort-type", required = false) sortType: SortType? = SortType.NEWEST,
         @AuthenticationPrincipal(expression = "#this == 'anonymousUser' ? null : member") member: Member?,
         pageable: Pageable
     ) = run {
         if (member == null) throw SodaException("로그인 정보를 확인해주세요.")
 
-        ApiResponse.ok(service.getCurationContent(id, sortType, member, pageable))
+        ApiResponse.ok(service.getCurationContent(id, sortType ?: SortType.NEWEST, member, pageable))
     }
 }
diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/content/series/ContentSeriesController.kt b/src/main/kotlin/kr/co/vividnext/sodalive/content/series/ContentSeriesController.kt
index 43a5068..9dffcfc 100644
--- a/src/main/kotlin/kr/co/vividnext/sodalive/content/series/ContentSeriesController.kt
+++ b/src/main/kotlin/kr/co/vividnext/sodalive/content/series/ContentSeriesController.kt
@@ -18,7 +18,7 @@ class ContentSeriesController(private val service: ContentSeriesService) {
     @GetMapping
     fun getSeriesList(
         @RequestParam creatorId: Long,
-        @RequestParam("sortType", required = false) sortType: SeriesSortType = SeriesSortType.NEWEST,
+        @RequestParam("sortType", required = false) sortType: SeriesSortType? = SeriesSortType.NEWEST,
         @AuthenticationPrincipal(expression = "#this == 'anonymousUser' ? null : member") member: Member?,
         pageable: Pageable
     ) = run {
@@ -27,7 +27,7 @@ class ContentSeriesController(private val service: ContentSeriesService) {
         ApiResponse.ok(
             service.getSeriesList(
                 creatorId = creatorId,
-                sortType = sortType,
+                sortType = sortType ?: SeriesSortType.NEWEST,
                 member = member,
                 offset = pageable.offset,
                 limit = pageable.pageSize.toLong()
diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/content/theme/AudioContentThemeController.kt b/src/main/kotlin/kr/co/vividnext/sodalive/content/theme/AudioContentThemeController.kt
index 292fccd..a17ddfe 100644
--- a/src/main/kotlin/kr/co/vividnext/sodalive/content/theme/AudioContentThemeController.kt
+++ b/src/main/kotlin/kr/co/vividnext/sodalive/content/theme/AudioContentThemeController.kt
@@ -29,7 +29,7 @@ class AudioContentThemeController(private val service: AudioContentThemeService)
     @GetMapping("/{id}/content")
     fun getContentByTheme(
         @PathVariable id: Long,
-        @RequestParam("sort-type", required = false) sortType: SortType = SortType.NEWEST,
+        @RequestParam("sort-type", required = false) sortType: SortType? = SortType.NEWEST,
         @AuthenticationPrincipal(expression = "#this == 'anonymousUser' ? null : member") member: Member?,
         pageable: Pageable
     ) = run {
@@ -38,7 +38,7 @@ class AudioContentThemeController(private val service: AudioContentThemeService)
         ApiResponse.ok(
             service.getContentByTheme(
                 themeId = id,
-                sortType = sortType,
+                sortType = sortType ?: SortType.NEWEST,
                 member = member,
                 offset = pageable.offset,
                 limit = pageable.pageSize.toLong()
diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/creator/admin/signature/CreatorAdminSignatureController.kt b/src/main/kotlin/kr/co/vividnext/sodalive/creator/admin/signature/CreatorAdminSignatureController.kt
index 38760cd..c9480a4 100644
--- a/src/main/kotlin/kr/co/vividnext/sodalive/creator/admin/signature/CreatorAdminSignatureController.kt
+++ b/src/main/kotlin/kr/co/vividnext/sodalive/creator/admin/signature/CreatorAdminSignatureController.kt
@@ -41,13 +41,19 @@ class CreatorAdminSignatureController(private val service: CreatorAdminSignature
         @RequestParam("can") can: Int,
         @RequestParam("time") time: Int,
         @RequestParam("image") image: MultipartFile,
-        @RequestParam("isAdult", required = false) isAdult: Boolean = false,
+        @RequestParam("isAdult", required = false) isAdult: Boolean? = false,
         @AuthenticationPrincipal(expression = "#this == 'anonymousUser' ? null : member") member: Member?
     ) = run {
         if (member == null) throw SodaException("로그인 정보를 확인해주세요.")
 
         ApiResponse.ok(
-            service.createSignature(can = can, time = time, image = image, isAdult = isAdult, memberId = member.id!!),
+            service.createSignature(
+                can = can,
+                time = time,
+                image = image,
+                isAdult = isAdult ?: false,
+                memberId = member.id!!
+            ),
             "등록되었습니다."
         )
     }