Skip to content

DispatcherServlet에 따른 비활성 상태의 데이터 추출 여부 변경 #61

@hayeon17kim

Description

@hayeon17kim

Description

app DispatcherServlet과 admin DispatcherServlet 모두 같은 Mapper 파일을 참조하고 있다. 그리고 Mapper에서는 활성여부를 판단하지 않고 모든 데이터를 select하고 있다. 그러나 app DispatcherServlet의 경우 DB에서 데이터를 가져올 때부터 비활성상태의 게시글, 태그, 유저, 댓글은 가져오지 말아야 한다.
이를 위해서는 list(), detail()와 같이 데이터를 가져오는 메서드에서 Map 객체를 파라미터로 넘겨주도록 바꿔야 한다. 그리고 Map 에는 type이라는 이름으로 admin인지 app인지를 PageController에서 지정하여 메서드를 호출하도록 만든다.

Progress

  • UserController, User Model 수정
  • ArticleController, Article Model 수정
  • CommentController, Comment Model 수정
  • TagController, Tag Model 수정

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions