move ItemEditor & UserEditor to editor.Item & editor.User
Signed-off-by: Puqns67 <me@puqns67.icu>
This commit is contained in:
parent
bef0ea157a
commit
74ebccff85
@ -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
|
@ -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)
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user