Skip to content

Feat: 강의 다시보기 API 구현 #248

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 1 commit into from
Dec 11, 2023

Conversation

tmddus2
Copy link
Collaborator

@tmddus2 tmddus2 commented Dec 11, 2023

작업 개요

close #247 강의 다시보기 관련 정보를 조회할 수 있다.

작업 사항

DB에서 저장된 화이트보드 화면 log와 음성, 자막을 조회한 뒤, 응답을 내려준다.

고민한 점들(필수 X)

강의 다시보기 정보를 조회할 때 강의 코드를 사용해서 조회하도록 초기 설계가 되어있었다. 그런데 강의 다시보기 API는 강의가 종료된 후에 호출되는데, 강의가 종료될 때 DB에서 강의코드를 삭제하도록 구현했었다. 이미 DB에서 강의코드가 삭제된 시점에 강의코드로 다시보기 조회를 하려고 하니 에러가 발생했다. 그래서 다시보기의 경우 강의 코드가 아니라 강의 id 값으로 조회하도록 수정하였다.

DB에 저장될 때 생성되는 id 값을 프론트와 공유하지 않는 게 좋겠다고 판단해서 기존에는 강의코드를 활용해여 API 작성을 하였다. 왜냐하면 auto increment 등으로 설정이 되어있다면 id 값을 유추할 수 있기 때문이었다. 그런데 MongoDB에서 저장할 때 생성되는 id 값은 657605785b0c7ced41076fdf 처럼 긴 랜덤의 문자열 값이라서 id를 통해 유추하기는 어려울 것이라고 판단해 이를 프론트와 공유해서 API 호출에 사용하기로 결정했다.

Copy link

netlify bot commented Dec 11, 2023

Deploy Preview for boarlog ready!

Name Link
🔨 Latest commit 5a03eb1
🔍 Latest deploy log https://app.netlify.com/sites/boarlog/deploys/657676686eb95f00083adfcd
😎 Deploy Preview https://deploy-preview-248--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 11, 2023 02:39
@tmddus2 tmddus2 self-assigned this Dec 11, 2023
@tmddus2 tmddus2 added ✨ Feat 기능 개발 BE 백엔드 작업 labels Dec 11, 2023
@tmddus2 tmddus2 added this to the 6주차 milestone Dec 11, 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 d8ff317 into boostcampwm2023:dev Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BE 백엔드 작업 ✨ Feat 기능 개발
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: 강의 다시보기 관련 정보를 조회할 수 있다.
2 participants