From f9f9b9aab9db1dcbf85647518f34d115d22734d3 Mon Sep 17 00:00:00 2001 From: Klaus Date: Sat, 22 Mar 2025 04:39:54 +0900 Subject: [PATCH] =?UTF-8?q?FAQ=20-=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20?= =?UTF-8?q?=EC=97=86=EC=9D=B4=20=EC=A1=B0=ED=9A=8C=EA=B0=80=20=EA=B0=80?= =?UTF-8?q?=EB=8A=A5=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kotlin/kr/co/vividnext/sodalive/configs/SecurityConfig.kt | 3 +++ src/main/kotlin/kr/co/vividnext/sodalive/faq/FaqController.kt | 2 +- .../kr/co/vividnext/sodalive/notice/ServiceNoticeController.kt | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/configs/SecurityConfig.kt b/src/main/kotlin/kr/co/vividnext/sodalive/configs/SecurityConfig.kt index e23ce6e..6af8db9 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/configs/SecurityConfig.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/configs/SecurityConfig.kt @@ -8,6 +8,7 @@ import kr.co.vividnext.sodalive.jwt.JwtFilter import kr.co.vividnext.sodalive.jwt.TokenProvider import org.springframework.context.annotation.Bean import org.springframework.context.annotation.Configuration +import org.springframework.http.HttpMethod import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity import org.springframework.security.config.annotation.web.builders.HttpSecurity import org.springframework.security.config.annotation.web.builders.WebSecurity @@ -77,6 +78,8 @@ class SecurityConfig( .antMatchers("/v2/audio-content/main/home").permitAll() .antMatchers("/v2/audio-content/main/home/popular-content-by-creator").permitAll() .antMatchers("/v2/audio-content/main/home/content/ranking").permitAll() + .antMatchers(HttpMethod.GET, "/faq").permitAll() + .antMatchers(HttpMethod.GET, "/faq/category").permitAll() .anyRequest().authenticated() .and() .build() diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/faq/FaqController.kt b/src/main/kotlin/kr/co/vividnext/sodalive/faq/FaqController.kt index 195d3ea..729667a 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/faq/FaqController.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/faq/FaqController.kt @@ -31,7 +31,7 @@ class FaqController(private val service: FaqService) { @DeleteMapping("/{id}") @PreAuthorize("hasRole('ADMIN')") - fun deleteCan(@PathVariable id: Long) = ApiResponse.ok(service.delete(id), "삭제되었습니다.") + fun deleteFaq(@PathVariable id: Long) = ApiResponse.ok(service.delete(id), "삭제되었습니다.") @GetMapping fun getFaqList(@RequestParam("category") category: String) = ApiResponse.ok(service.getFaqList(category)) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/notice/ServiceNoticeController.kt b/src/main/kotlin/kr/co/vividnext/sodalive/notice/ServiceNoticeController.kt index e4f258f..f93eeaf 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/notice/ServiceNoticeController.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/notice/ServiceNoticeController.kt @@ -31,7 +31,7 @@ class ServiceNoticeController(private val service: ServiceNoticeService) { @DeleteMapping("/{id}") @PreAuthorize("hasRole('ADMIN')") - fun deleteCan(@PathVariable id: Long) = ApiResponse.ok(service.delete(id), "삭제되었습니다.") + fun deleteNotice(@PathVariable id: Long) = ApiResponse.ok(service.delete(id), "삭제되었습니다.") @GetMapping fun getNoticeList(pageable: Pageable, timezone: String) = ApiResponse.ok(service.getNoticeList(pageable, timezone))