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

Add discriminator for lesson page and activity page #76

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

carolynzhang18
Copy link
Collaborator

@carolynzhang18 carolynzhang18 commented Oct 31, 2024

Notion ticket link

Ticket Name

Implementation description

  • Added discriminators for LessonPage vs. ActivityPage to accommodate PDFs for lessons (see coursepage.mgmodel.ts)

Steps to test

  1. To test, what I did was import LessonPageModel and ActivityPageModel into server.ts, write a function that does [Lesson|Activity]PageModel.create({ <data> }), and then call this function in the server.listen callback. This should create a new document in the coursepages model in MongoDB.

What should reviewers focus on?

Checklist

  • My PR name is descriptive and in imperative tense
  • My commit messages are descriptive and in imperative tense. My commits are atomic and trivial commits are squashed or fixup'd into non-trivial commits
  • I have run the appropriate linter(s)
  • I have requested a review from the PL, as well as other devs who have background knowledge on this PR or who will be building on top of this PR

Copy link
Collaborator

@ji-mmyliu ji-mmyliu left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

Here's what my Mongo looked like after testing:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants