Skip to content

Commit

Permalink
[BE] refactor: 사용하지 않는 AdminService 제거 (#610) (#611)
Browse files Browse the repository at this point in the history
* test: 테스트 코드에 서비스 클래스 제거

* refactor: AdminService 삭제

* refactor: AdminDTO 삭제

* style: 개행 수정
  • Loading branch information
seokjin8678 authored Nov 16, 2023
1 parent 6f846cd commit 5bf0d29
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 192 deletions.
108 changes: 0 additions & 108 deletions backend/src/main/java/com/festago/admin/application/AdminService.java

This file was deleted.

This file was deleted.

11 changes: 0 additions & 11 deletions backend/src/main/java/com/festago/admin/dto/AdminResponse.java

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.festago.presentation;

import com.festago.admin.application.AdminService;
import com.festago.admin.dto.AdminResponse;
import com.festago.auth.annotation.Admin;
import com.festago.auth.application.AdminAuthService;
import com.festago.auth.dto.AdminLoginRequest;
Expand Down Expand Up @@ -54,7 +52,6 @@ public class AdminController {
private final FestivalService festivalService;
private final StageService stageService;
private final TicketService ticketService;
private final AdminService adminService;
private final AdminAuthService adminAuthService;
private final SchoolService schoolService;
private final Optional<BuildProperties> properties;
Expand Down Expand Up @@ -147,13 +144,6 @@ private String getCookie(String token) {
.build().toString();
}

@GetMapping("/data")
public ResponseEntity<AdminResponse> adminData() {
AdminResponse response = adminService.getAdminResponse();
return ResponseEntity.ok()
.body(response);
}

@GetMapping("/version")
public ResponseEntity<String> getVersion() {
return properties.map(it -> ResponseEntity.ok(it.getTime().atZone(ZoneId.of("Asia/Seoul")).toString()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ public String manageStagePage(@PathVariable String stageId) {

@ExceptionHandler(UnauthorizedException.class)
public View handle(UnauthorizedException e, HttpServletResponse response) {

if (e.getErrorCode() == ErrorCode.EXPIRED_AUTH_TOKEN) {
return new RedirectView("/admin/login");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.festago.admin.application.AdminService;
import com.festago.auth.application.AdminAuthService;
import com.festago.auth.application.AuthExtractor;
import com.festago.auth.domain.Role;
Expand Down Expand Up @@ -70,9 +69,6 @@ class AdminControllerTest {
@MockBean
TicketService ticketService;

@MockBean
AdminService adminService;

@MockBean
AdminAuthService adminAuthService;

Expand Down

0 comments on commit 5bf0d29

Please sign in to comment.