From 74ebccff85591178bceb9e2a51a8ee5dfbb8c96f Mon Sep 17 00:00:00 2001 From: Puqns67 Date: Sun, 17 Sep 2023 22:31:24 +0800 Subject: [PATCH] move ItemEditor & UserEditor to editor.Item & editor.User Signed-off-by: Puqns67 --- .../controller/action/{ItemEditor.kt => editor/Item.kt} | 4 ++-- .../controller/action/{UserEditor.kt => editor/User.kt} | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) rename src/main/kotlin/team8/fruitable/controller/action/{ItemEditor.kt => editor/Item.kt} (98%) rename src/main/kotlin/team8/fruitable/controller/action/{UserEditor.kt => editor/User.kt} (97%) diff --git a/src/main/kotlin/team8/fruitable/controller/action/ItemEditor.kt b/src/main/kotlin/team8/fruitable/controller/action/editor/Item.kt similarity index 98% rename from src/main/kotlin/team8/fruitable/controller/action/ItemEditor.kt rename to src/main/kotlin/team8/fruitable/controller/action/editor/Item.kt index b9de260..d1ce98f 100644 --- a/src/main/kotlin/team8/fruitable/controller/action/ItemEditor.kt +++ b/src/main/kotlin/team8/fruitable/controller/action/editor/Item.kt @@ -1,4 +1,4 @@ -package team8.fruitable.controller.action +package team8.fruitable.controller.action.editor import org.springframework.beans.factory.annotation.Value import org.springframework.stereotype.Controller @@ -20,7 +20,7 @@ import kotlin.io.path.exists @Controller @RequestMapping("/action/edit/item") -class ItemEditor( +class Item( private val accountRepository: AccountRepository, private val itemRepository: ItemRepository, private val tagRepository: TagRepository diff --git a/src/main/kotlin/team8/fruitable/controller/action/UserEditor.kt b/src/main/kotlin/team8/fruitable/controller/action/editor/User.kt similarity index 97% rename from src/main/kotlin/team8/fruitable/controller/action/UserEditor.kt rename to src/main/kotlin/team8/fruitable/controller/action/editor/User.kt index 30bea8d..d59ff77 100644 --- a/src/main/kotlin/team8/fruitable/controller/action/UserEditor.kt +++ b/src/main/kotlin/team8/fruitable/controller/action/editor/User.kt @@ -1,4 +1,4 @@ -package team8.fruitable.controller.action +package team8.fruitable.controller.action.editor import jakarta.servlet.http.Cookie import jakarta.servlet.http.HttpServletResponse @@ -11,7 +11,7 @@ import team8.fruitable.datebase.repository.AccountRepository @Controller @RequestMapping("/action/edit/user") -class UserEditor(private val accountRepository: AccountRepository) { +class User(private val accountRepository: AccountRepository) { private fun getCurrentUser(token: String?): User? { return token?.let(accountRepository::findByToken) }