Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: 룸 업로드 페이지 리팩터링 #307

Merged
merged 1 commit into from
Sep 17, 2023
Merged

Conversation

Songusika
Copy link
Collaborator

@Songusika Songusika commented Sep 15, 2023

관련 이슈번호

작업 사항

룸 업로드 성공 시 🚀

  • 룸에 대한 업로드가 성공적으로 이루어지면 기존 선택한 슈퍼장르 유지
  • 나머지 필드에 대해서는 입력란을 초기화
  • 우측 하단에 업로드 성공 문구 출력

룸 업로드 실패 시 🥲

  • 기존 각 필드의 필수값, 최대값을 넘길 시 프론트 단에서 1차적으로 경고메시지 출력 후 요청 중단
  • 실제 서버에서 필수 값 및 글자수 검증 실패 시 우측 하단에 400 문구 출력
  • 다른 이유로 (중복 노래 추가 혹은 서버 장애 등) 업로드 실패 시 우측 하단에 500 문구 출력

기타 사항

자바스크립트 파일 분리

  • 현재 프론트 페이지에 <script> 태그안에 자바스크립트 코드가 존재합니다.
  • 처음에는 별도의 파일로 분리를 고려했습니다.
    • 단, 하나의 자바스크립트 파일을 서빙하기 위해서 스프링단에 addResouceHandler 를 오버라이드 해야하는 점이 있습니다.
  • 하나의 파일만을 위해서 별도의 핸들러를 넣는것이 과하다고 생각해서 일단은 <script> 태그 안에 js 코드를 넣어두었습니다.

중복 룸 업로드 검증 필요

현재 룸 추가 요청 시 요청한 타이틀과 가수가 이미 데이터베이스에 있는 경우 두 값이 복합키가 걸려있으므로 예외가 발생합니다.
현재 급한 것은 아니기 때문에 리팩터링 사항에 추가 후 추후 해당 검증 기능을 추가할 필요가 있습니다.

@Songusika Songusika added backend 백엔드 분야 feat 기능 개발 labels Sep 15, 2023
@Songusika Songusika added this to the 스프린트 5 milestone Sep 15, 2023
@Songusika Songusika self-assigned this Sep 15, 2023
Copy link
Collaborator

@0chil 0chil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JS도 잘하는 그는,,, 수륙양용,,,
BRDM 👍

그리고 꼼꼼하게 고민해주신거 너무 멋쟁이입니다..

Copy link
Collaborator

@kong-hana01 kong-hana01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JS 까지 잘하시네용

uploadService.save(request);

return "redirect:/upload";
return ResponseEntity.ok().build();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

const toast = new bootstrap.Toast(getElement('#toastNotification'));
const toastBody = getElement('.toast-body');
toastBody.textContent = message;
toastBody.style.color = isSuccess ? 'green' : 'red';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

삼항 연산자 오랜만에 보네요 ㅋㅋㅋㅋ

@Songusika Songusika merged commit a669095 into backend Sep 17, 2023
0chil added a commit that referenced this pull request Sep 21, 2023
* feat: id를 사용하는 entity는 BaseEntity를 상속하도록 수정 (#293)

* feat: id를 사용하는 entity는 BaseEntity를 상속하도록 수정

* refactor: flyway 사용 규칙에 따라 스크립트 수정

* refactor: 룸 업로드 페이지 리팩터링 (#307)

* refactor: 룸, 트랙, 미디어소스 역정규화 (#309)

* feat: 카카오 소셜 로그인 기능을 구현한다. (#301)

* refactor: 패키지 및 클래스 명 수정

* feat: 카카오 소셜로그인 idToken 검증 및 payload 추출 기능 구현

* feat: 카카오 소셜로그인 기능 구현

* refactor: jwkProvider를 static 변수로 가지도록 수정

* refactor: 구글 소셜로그인 검증 방식 통일

* refactor: 구글 소셜로그인 검증 방식 추상화

* feat: 멤버 객체 내 nickname 필드 추가

* feat: 닉네임 객체 구현

* refactor: 클래스 네이밍 변경

* feat: JwkProvider를 찾지 못할 때 예외 구현 및 record -> class로 변경

* refactor: final 키워드 추가

* chore: 닉네임 추가 sql 버전 변경 5.3 -> 5.4

---------

Co-authored-by: thdwoqor <celebarte01@gmail.com>

* chore: 데이터 베이스 테이블 컬럼 수정 (#311)

* feat: IdTokenResolver가 Provider에 맞게 동작한다 (#314)

* feat: IdTokenResolver가 Provider에 맞게 동작한다

* test: 지원하지 않는 Issuer 예외 테스트 추가

* refactor: 유지보수가 용이하도록 구조 개선

* refactor: 누락된 final 추가

* feat: 게스트로 로그인한다 (#316)

* feat: 게스트로 로그인한다

* feat: 빈 패스워드는 어떤 문자열과도 일치하지 않는다

* refactor: Member 클래스 내 생성자를 정적 팩토리 메소드로 변경

* refactor: final 키워드 추가

* fix: 머지 중 누락

---------

Co-authored-by: Kong-hana01 <gksqlsl11@khu.ac.kr>

* chore: 중복된 ci 파일 제거 (#323)

---------

Co-authored-by: Jae-Baek Song <83541246+thdwoqor@users.noreply.github.com>
Co-authored-by: Songusika <74398096+Songusika@users.noreply.github.com>
Co-authored-by: 0chil <gorae02@gmail.com>
Co-authored-by: thdwoqor <celebarte01@gmail.com>
kong-hana01 added a commit that referenced this pull request Jan 24, 2024
* feat: id를 사용하는 entity는 BaseEntity를 상속하도록 수정 (#293)

* feat: id를 사용하는 entity는 BaseEntity를 상속하도록 수정

* refactor: flyway 사용 규칙에 따라 스크립트 수정

* refactor: 룸 업로드 페이지 리팩터링 (#307)

* refactor: 룸, 트랙, 미디어소스 역정규화 (#309)

* feat: 카카오 소셜 로그인 기능을 구현한다. (#301)

* refactor: 패키지 및 클래스 명 수정

* feat: 카카오 소셜로그인 idToken 검증 및 payload 추출 기능 구현

* feat: 카카오 소셜로그인 기능 구현

* refactor: jwkProvider를 static 변수로 가지도록 수정

* refactor: 구글 소셜로그인 검증 방식 통일

* refactor: 구글 소셜로그인 검증 방식 추상화

* feat: 멤버 객체 내 nickname 필드 추가

* feat: 닉네임 객체 구현

* refactor: 클래스 네이밍 변경

* feat: JwkProvider를 찾지 못할 때 예외 구현 및 record -> class로 변경

* refactor: final 키워드 추가

* chore: 닉네임 추가 sql 버전 변경 5.3 -> 5.4

---------

Co-authored-by: thdwoqor <celebarte01@gmail.com>

* chore: 데이터 베이스 테이블 컬럼 수정 (#311)

* feat: IdTokenResolver가 Provider에 맞게 동작한다 (#314)

* feat: IdTokenResolver가 Provider에 맞게 동작한다

* test: 지원하지 않는 Issuer 예외 테스트 추가

* refactor: 유지보수가 용이하도록 구조 개선

* refactor: 누락된 final 추가

* feat: 게스트로 로그인한다 (#316)

* feat: 게스트로 로그인한다

* feat: 빈 패스워드는 어떤 문자열과도 일치하지 않는다

* refactor: Member 클래스 내 생성자를 정적 팩토리 메소드로 변경

* refactor: final 키워드 추가

* fix: 머지 중 누락

---------

Co-authored-by: Kong-hana01 <gksqlsl11@khu.ac.kr>

* chore: 중복된 ci 파일 제거 (#323)

* fix: 피드백 검증을 하지 않는 문제 해결

* chore: 컨벤션 통일

* docs: ci dev db 파일 수정

* fix: db url 수정

* fix: runs-on 수정

* chore: ci 스크립트 수정 복원

* chore: DB CI 복구

---------

Co-authored-by: Jae-Baek Song <83541246+thdwoqor@users.noreply.github.com>
Co-authored-by: Songusika <74398096+Songusika@users.noreply.github.com>
Co-authored-by: 0chil <gorae02@gmail.com>
Co-authored-by: thdwoqor <celebarte01@gmail.com>
kong-hana01 added a commit that referenced this pull request Mar 4, 2024
* feat: id를 사용하는 entity는 BaseEntity를 상속하도록 수정 (#293)

* feat: id를 사용하는 entity는 BaseEntity를 상속하도록 수정

* refactor: flyway 사용 규칙에 따라 스크립트 수정

* refactor: 룸 업로드 페이지 리팩터링 (#307)

* refactor: 룸, 트랙, 미디어소스 역정규화 (#309)

* feat: 카카오 소셜 로그인 기능을 구현한다. (#301)

* refactor: 패키지 및 클래스 명 수정

* feat: 카카오 소셜로그인 idToken 검증 및 payload 추출 기능 구현

* feat: 카카오 소셜로그인 기능 구현

* refactor: jwkProvider를 static 변수로 가지도록 수정

* refactor: 구글 소셜로그인 검증 방식 통일

* refactor: 구글 소셜로그인 검증 방식 추상화

* feat: 멤버 객체 내 nickname 필드 추가

* feat: 닉네임 객체 구현

* refactor: 클래스 네이밍 변경

* feat: JwkProvider를 찾지 못할 때 예외 구현 및 record -> class로 변경

* refactor: final 키워드 추가

* chore: 닉네임 추가 sql 버전 변경 5.3 -> 5.4

---------

Co-authored-by: thdwoqor <celebarte01@gmail.com>

* chore: 데이터 베이스 테이블 컬럼 수정 (#311)

* feat: IdTokenResolver가 Provider에 맞게 동작한다 (#314)

* feat: IdTokenResolver가 Provider에 맞게 동작한다

* test: 지원하지 않는 Issuer 예외 테스트 추가

* refactor: 유지보수가 용이하도록 구조 개선

* refactor: 누락된 final 추가

* feat: 게스트로 로그인한다 (#316)

* feat: 게스트로 로그인한다

* feat: 빈 패스워드는 어떤 문자열과도 일치하지 않는다

* refactor: Member 클래스 내 생성자를 정적 팩토리 메소드로 변경

* refactor: final 키워드 추가

* fix: 머지 중 누락

---------

Co-authored-by: Kong-hana01 <gksqlsl11@khu.ac.kr>

* chore: 중복된 ci 파일 제거 (#323)

* fix: 피드백 검증을 하지 않는 문제 해결

* chore: 컨벤션 통일

* refactor: DatabaseCleaner 인터페이스 및 구현체 구현

* refactor: AuthDatabaseCleaner 구현

* refactor: 외부에서 값을 주입받아 빈을 생성하도록 변경

* chore: 패키지 구조 변경(util -> config)

* refactor: ControllerTest의 profile 설정

* feat: MockLogin 객체 구현

* feat: MockLogin 객체 구현

* refactor: default 환경을 구성하는 컨트롤러 테스트 격리

* feat: 로그인을 담당하는 mock 서버 구현

* refactor: 로그인 환경을 설정하는 ControllerTestConfig 객체 구현

* refactor: 멤버 정보를 재사용해서 테스트를 하도록 변경

* fix: FeedbackControllerTest에서 캐싱사용하도록 변경

* docs: 예외 로그 확인 ci 파일 추가

* refactor: TestInstance 단위를 class로 변경

* refactor: MockLoginServer의 빈 스코프를 프로토타입으로 변경

* docs: ci 파일 복구

* refactor: 테스트 내 환경을 @TestConfiguration으로 변경

* chore: 사용하지 않는 콘솔 출력 제거

---------

Co-authored-by: Jae-Baek Song <83541246+thdwoqor@users.noreply.github.com>
Co-authored-by: Songusika <74398096+Songusika@users.noreply.github.com>
Co-authored-by: 0chil <gorae02@gmail.com>
Co-authored-by: thdwoqor <celebarte01@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend 백엔드 분야 feat 기능 개발
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants