move ItemEditor & UserEditor to editor.Item & editor.User

Signed-off-by: Puqns67 <me@puqns67.icu>
This commit is contained in:
Puqns67 2023-09-17 22:31:24 +08:00
parent bef0ea157a
commit 74ebccff85
Signed by: Puqns67
GPG Key ID: 9669DF042554F536
2 changed files with 4 additions and 4 deletions

View File

@ -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.beans.factory.annotation.Value
import org.springframework.stereotype.Controller import org.springframework.stereotype.Controller
@ -20,7 +20,7 @@ import kotlin.io.path.exists
@Controller @Controller
@RequestMapping("/action/edit/item") @RequestMapping("/action/edit/item")
class ItemEditor( class Item(
private val accountRepository: AccountRepository, private val accountRepository: AccountRepository,
private val itemRepository: ItemRepository, private val itemRepository: ItemRepository,
private val tagRepository: TagRepository private val tagRepository: TagRepository

View File

@ -1,4 +1,4 @@
package team8.fruitable.controller.action package team8.fruitable.controller.action.editor
import jakarta.servlet.http.Cookie import jakarta.servlet.http.Cookie
import jakarta.servlet.http.HttpServletResponse import jakarta.servlet.http.HttpServletResponse
@ -11,7 +11,7 @@ import team8.fruitable.datebase.repository.AccountRepository
@Controller @Controller
@RequestMapping("/action/edit/user") @RequestMapping("/action/edit/user")
class UserEditor(private val accountRepository: AccountRepository) { class User(private val accountRepository: AccountRepository) {
private fun getCurrentUser(token: String?): User? { private fun getCurrentUser(token: String?): User? {
return token?.let(accountRepository::findByToken) return token?.let(accountRepository::findByToken)
} }