docs: add JSDoc block to re-engagement cron route - #1371
Conversation
|
@DishiGpt is attempting to deploy a commit to the ixotic27-8245's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
👋 Hey @DishiGpt! Thanks for your contribution! 🎉 It looks like this PR isn't linked to any issue yet. Please edit your PR description and add a closing keyword so we can track this properly, for example:
Once you've updated the PR description the check will re-run automatically. 🙌 |
📋 GSSoC Label Validation Report✅ All label requirements met. This PR passes the pre-merge label check. 📖 Label Reference
|
There was a problem hiding this comment.
🔍 Security Scan: Review Needed
The following patterns were detected in the latest changes:
* Requires Authorization: Bearer ${CRON_SECRET} to verify the cron request.
A maintainer should review these findings before merging.
Hey @DishiGpt, please review these flagged items! 🛠️
|
👋 Hey @DishiGpt, welcome to The Leetcode City! 🎉 Thanks for opening your first pull request — this is a big deal and we appreciate the effort! While you wait for a review, please double-check:
A maintainer will review your PR shortly. Hang tight! 🚀 |
There was a problem hiding this comment.
🟢 Ready to approve
The change is documentation-only and the remaining feedback is limited to minor wording/clarity adjustments in the new JSDoc.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
Updates documentation for the re-engagement cron route handler by replacing an incomplete JSDoc block with a more descriptive one, aligned with the project’s cron-route documentation approach.
Changes:
- Expanded the JSDoc block above the exported
GEThandler for the re-engagement cron route. - Documented the Authorization Bearer secret requirement and the expected JSON response shape.
File summaries
| File | Description |
|---|---|
| src/app/api/cron/re-engagement/route.ts | Enhances the JSDoc for the re-engagement cron GET handler (purpose, auth requirement, and response description). |
Review details
Suppressed comments (1)
src/app/api/cron/re-engagement/route.ts:62
- The
@returnsdescription says "on failure", but this handler only explicitly returns{ error: string }for auth/config errors; other runtime failures (e.g., unexpected exceptions) would not necessarily match this JSON shape. Narrow the wording so the JSDoc stays strictly accurate.
* @returns {Promise<NextResponse>} JSON response with `{ ok: true, sent, skipped, errors }` on success,
* or `{ error: string }` on failure.
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔍 Security Scan: Review Needed
The following patterns were detected in the latest changes:
* Requires Authorization: Bearer <CRON_SECRET> to verify the cron request.
A maintainer should review these findings before merging.
Hey @DishiGpt, please review these flagged items! 🛠️
What does this PR do?
Adds a complete JSDoc comment block above the exported GET handler in
src/app/api/cron/re-engagement/route.ts. The function previously had onlyan
@paramannotation with no description. The new JSDoc block documents:@paramfor the NextRequest parameter@returnsshape of the JSON responseFollows the JSDoc style/pattern used in
src/app/api/cron/flush-batches/route.ts. This is a documentation-onlychange — no logic was modified.
Related issue
Fixes #1202
Screenshots
N/A — documentation-only change, no visual/UI impact.
Checklist
npm run lintpasses