Skip to content

Refactor: ResponseDto 추가 및 코드컨벤션 적용 #238

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

Merged
merged 2 commits into from
Dec 9, 2023

Conversation

tmddus2
Copy link
Collaborator

@tmddus2 tmddus2 commented Dec 9, 2023

작업 개요

  • 로그인 시 ResponseDto로 응답
  • dto 파일들 코드컨벤션 적용

작업 사항

  • 로그인할 때 토큰을 내려주는데 해당 응답을 ResponseDto를 만들어서 내려주도록 했습니다. 원래는 로그인에서만 쓰이는 dto인데 따로 정의를 하게 되면 불필요하게 너무 많은 dto들이 존재하게 될 것 같아 오히려 안 좋을 것이라고 생각했습니다. 그런데 swagger 설정을 하면서 응답 형식을 지정해줘야하는데 swagger 설정 형식과 실제 내려주는 응답을 통일시키기 위해서는 dto를 정의하는 게 좋겠다고 생각했습니다.

  • dto를 작성할 때 어떤 파일은 user.update.ts 형식으로 되어있고 어떤 파일은 enter-lecture.dto.ts 형식으로 되어있어 컨벤션을 맞추는 과정이 필요하겠다고 생각해 파일 이름을 수정하였습니다.

컨벤션 중 아래의 내용을 참고하여 수정하였습니다.

  • 백엔드 파일명은 kebab-case로 작성하고 목적을 "."으로 구분하여 작성해요.
    • ex. user-article.contorller.js

Copy link

netlify bot commented Dec 9, 2023

Deploy Preview for boarlog ready!

Name Link
🔨 Latest commit 721d5e3
🔍 Latest deploy log https://app.netlify.com/sites/boarlog/deploys/65742d3c7e0b6f000804472d
😎 Deploy Preview https://deploy-preview-238--boarlog.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@tmddus2 tmddus2 requested a review from platinouss December 9, 2023 09:02
@tmddus2 tmddus2 self-assigned this Dec 9, 2023
@tmddus2 tmddus2 added BE 백엔드 작업 🛠️ Refactor 리팩토링 작업 labels Dec 9, 2023
@tmddus2 tmddus2 changed the title Refactor ResponseDto 추가 및 코드컨벤션 적용 Refactor: ResponseDto 추가 및 코드컨벤션 적용 Dec 9, 2023
Copy link
Member

@platinouss platinouss left a comment

Choose a reason for hiding this comment

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

고생하셨습니다 ~

@platinouss platinouss merged commit c098181 into boostcampwm2023:dev Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BE 백엔드 작업 🛠️ Refactor 리팩토링 작업
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants