From f3746bce42a1085af6af4550a491b376a550be45 Mon Sep 17 00:00:00 2001 From: Yongbeom Kim Date: Thu, 2 Jan 2025 16:28:48 +0900 Subject: [PATCH] =?UTF-8?q?actions=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/lint.yml | 2 ++ .../memo/controller/MemoController.kt | 11 +++++--- .../tag/controller/TagController.kt | 7 ++++++ .../memoWithTags/tag/service/TagService.kt | 3 +++ .../user/contoller/UserController.kt | 25 +++++++++++-------- 5 files changed, 34 insertions(+), 14 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b4e9912..d4d98f7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -3,10 +3,12 @@ name: Kotlin Lint Check on: push: branches: + - actions - main - develop pull_request: branches: + - actions - main - develop diff --git a/src/main/kotlin/com/wafflestudio/toyproject/memoWithTags/memo/controller/MemoController.kt b/src/main/kotlin/com/wafflestudio/toyproject/memoWithTags/memo/controller/MemoController.kt index 707ce2c..6ded995 100644 --- a/src/main/kotlin/com/wafflestudio/toyproject/memoWithTags/memo/controller/MemoController.kt +++ b/src/main/kotlin/com/wafflestudio/toyproject/memoWithTags/memo/controller/MemoController.kt @@ -1,18 +1,23 @@ package com.wafflestudio.toyproject.memoWithTags.memo.controller import com.wafflestudio.toyproject.memoWithTags.memo.service.MemoService -import org.springframework.web.bind.annotation.RestController +import org.springframework.web.bind.annotation.* +import java.time.Instant @RestController class MemoController( private val memoService: MemoService ) { @PostMapping("/api/v1/memo") - fun createMemo(@RequestBody request: CreateMemoRequest): MemoDto { + fun createMemo(@RequestBody request: CreateMemoResponse): MemoDto { + return MemoDto("", emptyList()) + } @PutMapping("/api/v1/memo/{memoId}") - fun updateMemo(@PathVariable memoId: Long, @RequestBody request: UpdateMemoRequest): MemoDto { + fun updateMemo(@PathVariable memoId: Long, @RequestBody request: UpdateMemoResponse): MemoDto { + return MemoDto("", emptyList()) + } @DeleteMapping("/api/v1/memo/{memoId}") diff --git a/src/main/kotlin/com/wafflestudio/toyproject/memoWithTags/tag/controller/TagController.kt b/src/main/kotlin/com/wafflestudio/toyproject/memoWithTags/tag/controller/TagController.kt index 858b9de..ddff15a 100644 --- a/src/main/kotlin/com/wafflestudio/toyproject/memoWithTags/tag/controller/TagController.kt +++ b/src/main/kotlin/com/wafflestudio/toyproject/memoWithTags/tag/controller/TagController.kt @@ -1,23 +1,30 @@ package com.wafflestudio.toyproject.memoWithTags.tag.controller +import com.wafflestudio.toyproject.memoWithTags.tag.service.TagService +import org.springframework.web.bind.annotation.* + @RestController class TagController( private val tagService: TagService ) { @GetMapping("/api/v1/tag") fun getTags(): List { + return emptyList() // 빈 리스트 반환 } @PostMapping("/api/v1/tag") fun createTag(@RequestBody request: CreateTagRequest): TagDto { + return TagDto(0L, "", "") // 기본값으로 TagDto 반환 } @PutMapping("/api/v1/tag/{tagId}") fun updateTag(@PathVariable id: Long, @RequestBody request: UpdateTagRequest): TagDto { + return TagDto(0L, "", "") // 기본값으로 TagDto 반환 } @DeleteMapping("/api/v1/tag/{tagId}") fun deleteTag(@PathVariable id: Long) { + // 반환 타입이 Unit이므로 아무 작업 없이 비워 둬도 OK } } diff --git a/src/main/kotlin/com/wafflestudio/toyproject/memoWithTags/tag/service/TagService.kt b/src/main/kotlin/com/wafflestudio/toyproject/memoWithTags/tag/service/TagService.kt index fb3d026..2178850 100644 --- a/src/main/kotlin/com/wafflestudio/toyproject/memoWithTags/tag/service/TagService.kt +++ b/src/main/kotlin/com/wafflestudio/toyproject/memoWithTags/tag/service/TagService.kt @@ -1,4 +1,7 @@ package com.wafflestudio.toyproject.memoWithTags.tag.service +import org.springframework.stereotype.Service + +@Service class TagService { } \ No newline at end of file diff --git a/src/main/kotlin/com/wafflestudio/toyproject/memoWithTags/user/contoller/UserController.kt b/src/main/kotlin/com/wafflestudio/toyproject/memoWithTags/user/contoller/UserController.kt index 57c17c4..82858f9 100644 --- a/src/main/kotlin/com/wafflestudio/toyproject/memoWithTags/user/contoller/UserController.kt +++ b/src/main/kotlin/com/wafflestudio/toyproject/memoWithTags/user/contoller/UserController.kt @@ -1,44 +1,47 @@ -package com.wafflestudio.toyproject.memoWithTags.user.contoller +package com.wafflestudio.toyproject.memoWithTags.user.controller + +import org.springframework.web.bind.annotation.GetMapping +import org.springframework.web.bind.annotation.PostMapping +import org.springframework.web.bind.annotation.RequestBody +import org.springframework.web.bind.annotation.RestController @RestController -class UserController( +class UserController { -) { @GetMapping("/api/v1/auth/register") fun register(@RequestBody request: RegisterRequest): RegisterResponse { - + return RegisterResponse("", "", 0L) // 기본값으로 RegisterResponse 반환 } @PostMapping("/api/v1/auth/login") fun login(@RequestBody request: LoginRequest): LoginResponse { - + return LoginResponse("", "", 0L) // 기본값으로 LoginResponse 반환 } @PostMapping("/api/v1/auth/logout") fun logout(@RequestBody request: LogoutRequest) { - + // 반환 타입이 Unit이므로 아무 작업 없이 비워 둬도 OK } @PostMapping("/api/v1/auth/verify-email") fun verifyEmail(@RequestBody request: VerifyEmailRequest) { - + // 반환 타입이 Unit이므로 아무 작업 없이 비워 둬도 OK } @PostMapping("/api/v1/auth/forgot-password") fun forgotPassword(@RequestBody request: ForgotPasswordRequest) { - + // 반환 타입이 Unit이므로 아무 작업 없이 비워 둬도 OK } @PostMapping("/api/v1/auth/reset-password") fun resetPassword(@RequestBody request: ResetPasswordRequest) { - + // 반환 타입이 Unit이므로 아무 작업 없이 비워 둬도 OK } @PostMapping("/api/v1/auth/refresh-token") fun refreshToken(): RefreshTokenResponse { - + return RefreshTokenResponse("", "", 0L) // 기본값으로 RefreshTokenResponse 반환 } - } data class RegisterRequest(