Skip to content

Commit

Permalink
[Feat] delete v1 api (#113)
Browse files Browse the repository at this point in the history
* feat: v1 api 제거

* test: v1을 사용하던 인수테스트를 전부 v2 api를 사용하도록 변경

* test(NoticeControllerTest): 사용되지 않는 api v1의 slice 테스트 삭제

* feat(AuthInterceptor): 더이상 사용하지 않는 interceptor 제거
  • Loading branch information
zbqmgldjfh authored Jan 13, 2024
1 parent 96e30c2 commit d2672fd
Show file tree
Hide file tree
Showing 21 changed files with 94 additions and 850 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public enum ErrorCode {
LIB_BAD_RESPONSE("도서관 공지 요청에 대한 응답이 비정상적입니다."),
LIB_CANNOT_PARSE_JSON("도서관 공지를 POJO로 변환할 수 없습니다."),

CAT_NOT_EXIST_CATEGORY("서버에서 지원하지 않는 카테고리입니다."),
CAT_NOT_EXIST_CATEGORY(HttpStatus.BAD_REQUEST, "서버에서 지원하지 않는 카테고리입니다."),

// STAFF_SCRAPER_TAG_NOT_EXIST("Jsoup - 찾고자 하는 태그가 존재하지 않습니다."),
STAFF_SCRAPER_EXCEED_RETRY_LIMIT("교직원 업데이트 재시도 횟수를 초과했습니다."),
Expand Down

This file was deleted.

18 changes: 0 additions & 18 deletions src/main/java/com/kustacks/kuring/config/WebMvcConfig.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class NoticeService {

private final NoticeRepository noticeRepository;
private final DepartmentNoticeRepository departmentNoticeRepository;
private final CategoryName[] categoryNames;
private final CategoryName[] supportedCategoryNameList;
private final DepartmentName[] supportedDepartmentNameList;
private final String SPACE_REGEX = "[\\s+]";

Expand All @@ -39,7 +39,7 @@ public class NoticeService {
public NoticeService(NoticeRepository noticeRepository, DepartmentNoticeRepository departmentNoticeRepository) {
this.noticeRepository = noticeRepository;
this.departmentNoticeRepository = departmentNoticeRepository;
this.categoryNames = CategoryName.values();
this.supportedCategoryNameList = CategoryName.values();
this.supportedDepartmentNameList = DepartmentName.values();
}

Expand Down Expand Up @@ -102,7 +102,7 @@ private List<String> noticeCategoryNameConvertEnglish(String[] splitedKeywords)
}

private String convertEnglish(String keyword) {
for (CategoryName categoryName : categoryNames) {
for (CategoryName categoryName : supportedCategoryNameList) {
if (categoryName.isSameKorName(keyword)) {
return categoryName.getName();
}
Expand All @@ -111,7 +111,7 @@ private String convertEnglish(String keyword) {
}

private String convertShortNameIntoLongName(String typeShortName) {
return Arrays.stream(categoryNames)
return Arrays.stream(supportedCategoryNameList)
.filter(categoryName -> categoryName.isSameShortName(typeShortName))
.findFirst()
.map(CategoryName::getName)
Expand Down

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,4 +1,4 @@
package com.kustacks.kuring.user.common;
package com.kustacks.kuring.user.common.dto;

import lombok.AccessLevel;
import lombok.AllArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.kustacks.kuring.user.common;
package com.kustacks.kuring.user.common.dto;

import lombok.AccessLevel;
import lombok.AllArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.kustacks.kuring.user.presentation;

import com.kustacks.kuring.common.dto.BaseResponse;
import com.kustacks.kuring.user.common.SubscribeCategoriesRequest;
import com.kustacks.kuring.user.common.SubscribeDepartmentsRequest;
import com.kustacks.kuring.user.common.dto.SubscribeCategoriesRequest;
import com.kustacks.kuring.user.common.dto.SubscribeDepartmentsRequest;
import com.kustacks.kuring.user.common.dto.SaveFeedbackRequest;
import com.kustacks.kuring.user.facade.UserCommandFacade;
import lombok.RequiredArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class AdminAcceptanceTest extends AcceptanceTest {
* when : 어드민이 피드백 조회시
* then : 성공적으로 조회된다
*/
@DisplayName("사용자 피드백 조회")
@DisplayName("[v2] 사용자 피드백 조회")
@Test
void role_root_admin_search_feedbacks() {
// given
Expand All @@ -48,7 +48,7 @@ void role_root_admin_search_feedbacks() {
* when : 테스트 공지를 발송하면
* then : 성공적으로 발송된다.
*/
@DisplayName("테스트 공지 발송")
@DisplayName("[v2] 테스트 공지 발송")
@Test
void role_root_admin_create_test_notification() {
// given
Expand Down Expand Up @@ -80,7 +80,7 @@ void role_root_admin_create_test_notification() {
* When : ROLE_ROOT의 API에 접근시
* Then : 응답받을 수 있다
*/
@DisplayName("Root -> Root API 접근 테스트")
@DisplayName("[v2] Root -> Root API 접근 테스트")
@Test
void role_root_admin_call_root_api_test() {
// given
Expand Down Expand Up @@ -109,7 +109,7 @@ void role_root_admin_call_root_api_test() {
* When : ROLE_CLIENT의 API에 접근시
* Then : 응답받을 수 있다
*/
@DisplayName("Root -> Client API 접근 테스트")
@DisplayName("[v2] Root -> Client API 접근 테스트")
@Test
void role_root_admin_call_client_api_test() {
// given
Expand Down Expand Up @@ -138,7 +138,7 @@ void role_root_admin_call_client_api_test() {
* When : ROLE_CLIENT의 API에 접근시
* Then : 응답받을 수 있다
*/
@DisplayName("Client -> Client API 접근 테스트")
@DisplayName("[v2] Client -> Client API 접근 테스트")
@Test
void role_client_admin_call_client_api_test() {
// given
Expand Down Expand Up @@ -167,7 +167,7 @@ void role_client_admin_call_client_api_test() {
* When : ROLE_ROOT의 API에 접근시
* Then : 응답받을 수 없다
*/
@DisplayName("Client -> Root API 접근 테스트")
@DisplayName("[v2] Client -> Root API 접근 테스트")
@Test
void role_client_admin_call_root_api_test() {
// given
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@DisplayName("인수 : 인증")
class AuthAcceptanceTest extends AcceptanceTest {

@DisplayName("Bearer Auth login")
@DisplayName("[v2] Bearer Auth login")
@Test
void bearer_auth_login_success() {
// given
Expand All @@ -22,7 +22,7 @@ void bearer_auth_login_success() {
}


@DisplayName("존재하지 않는 id, password 로그인을 시도한다")
@DisplayName("[v2] 존재하지 않는 id, password 로그인을 시도한다")
@Test
void bearer_auth_login_fail() {
// given
Expand Down
Loading

0 comments on commit d2672fd

Please sign in to comment.