Skip to content

Product and customer API#785

Open
rajat1saxena wants to merge 1 commit into
mainfrom
issue-784
Open

Product and customer API#785
rajat1saxena wants to merge 1 commit into
mainfrom
issue-784

Conversation

@rajat1saxena
Copy link
Copy Markdown
Member

No description provided.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
courselit-docs Ready Ready Preview, Comment May 11, 2026 8:00pm

Request Review

verifyMandatoryTags(parsedContent.content);

$set["groups.$.drip.email"] = {
content: parsedContent,
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 189b9162cd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +737 to +740
return await LessonModel.find({
domain: ctx.subdomain._id,
courseId: course.courseId,
}).sort({ _id: 1 });
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Return lessons in course order, not document insertion order

Sorting by _id ignores the canonical ordering stored in groups[].lessonsOrder (and group ranks), so after a lesson is moved/reordered the lessons list can return a stale sequence. This breaks clients that rely on GET /api/products/{productId}/lessons to reflect the current curriculum order managed via the move/reorder endpoints.

Useful? React with 👍 / 👎.

Comment on lines +12 to +13
userId: user.userId,
email: user.email,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Guard against missing user records when serializing customers

serializeMember dereferences user.userId without checking whether a matching user document was found for each membership. If the memberships table contains an orphaned userId (for example after partial/manual cleanup), this endpoint throws and returns a 422 for the whole page instead of returning the remaining valid customers.

Useful? React with 👍 / 👎.

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