Product and customer API#785
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| verifyMandatoryTags(parsedContent.content); | ||
|
|
||
| $set["groups.$.drip.email"] = { | ||
| content: parsedContent, |
There was a problem hiding this comment.
💡 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".
| return await LessonModel.find({ | ||
| domain: ctx.subdomain._id, | ||
| courseId: course.courseId, | ||
| }).sort({ _id: 1 }); |
There was a problem hiding this comment.
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 👍 / 👎.
| userId: user.userId, | ||
| email: user.email, |
There was a problem hiding this comment.
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 👍 / 👎.
No description provided.