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

[NDD-281]: 문제집 객체를 생성한다 (2h / 1h) #113

Merged
merged 13 commits into from
Nov 28, 2023
Merged

Conversation

JangAJang
Copy link
Collaborator

@JangAJang JangAJang commented Nov 27, 2023

NDD-281 Powered by Pull Request Badge

Why

  • 회원은 자신의 문제집을 생성할 수 있어야 한다.

How

async createWorkbook(
    createWorkbookRequest: CreateWorkbookRequest,
    member: Member,
  ) {
    const category = await this.categoryRepository.findByCategoryId(
      createWorkbookRequest.categoryId,
    );
    validateManipulatedToken(member);
    validateCategory(category);

    return await this.workbookRepository.save(
      Workbook.of(
        createWorkbookRequest.title,
        createWorkbookRequest.content,
        category,
        member,
      ),
    );
  }
  • 해당 방식으로 생성한다.
  • 토큰을 통해 Member를 받는다.
  • dto의 타입 및 입력 검증은 validator를 통해 처리한다

Result

스크린샷 2023-11-28 12 36 04
스크린샷 2023-11-28 12 36 26

Copy link

cloudflare-workers-and-pages bot commented Nov 28, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: bbddf90
Status: ✅  Deploy successful!
Preview URL: https://0c1be971.gomterview.pages.dev
Branch Preview URL: https://feature-ndd-281.gomterview.pages.dev

View logs

@JangAJang JangAJang self-assigned this Nov 28, 2023
@JangAJang JangAJang added BE 백엔드 코드 변경사항 feature 새로운 기능이 추가 된 경우 test 테스트코드가 변경된 경우 labels Nov 28, 2023
@JangAJang JangAJang changed the title [NDD-281]: 문제집 객체를 생성한다 (1h / 1h) [NDD-281]: 문제집 객체를 생성한다 (2h / 1h) Nov 28, 2023
Copy link
Collaborator

@quiet-honey quiet-honey left a comment

Choose a reason for hiding this comment

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

category가 많이 변경됐군요! 고생하셨습니다.

@JangAJang JangAJang merged commit 3e0f0e7 into dev Nov 28, 2023
2 checks passed
@delete-merged-branch delete-merged-branch bot deleted the feature/NDD-281 branch November 28, 2023 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BE 백엔드 코드 변경사항 feature 새로운 기능이 추가 된 경우 test 테스트코드가 변경된 경우
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants