Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
작업 개요
close #247 강의 다시보기 관련 정보를 조회할 수 있다.
작업 사항
DB에서 저장된 화이트보드 화면 log와 음성, 자막을 조회한 뒤, 응답을 내려준다.
고민한 점들(필수 X)
강의 다시보기 정보를 조회할 때 강의 코드를 사용해서 조회하도록 초기 설계가 되어있었다. 그런데 강의 다시보기 API는 강의가 종료된 후에 호출되는데, 강의가 종료될 때 DB에서 강의코드를 삭제하도록 구현했었다. 이미 DB에서 강의코드가 삭제된 시점에 강의코드로 다시보기 조회를 하려고 하니 에러가 발생했다. 그래서 다시보기의 경우 강의 코드가 아니라 강의 id 값으로 조회하도록 수정하였다.
DB에 저장될 때 생성되는 id 값을 프론트와 공유하지 않는 게 좋겠다고 판단해서 기존에는 강의코드를 활용해여 API 작성을 하였다. 왜냐하면 auto increment 등으로 설정이 되어있다면 id 값을 유추할 수 있기 때문이었다. 그런데 MongoDB에서 저장할 때 생성되는 id 값은
657605785b0c7ced41076fdf
처럼 긴 랜덤의 문자열 값이라서 id를 통해 유추하기는 어려울 것이라고 판단해 이를 프론트와 공유해서 API 호출에 사용하기로 결정했다.