Yao - Reddit Auto Poster Backend#1315
Closed
yaow62023 wants to merge 1 commit into
Closed
Conversation
- Add Reddit posting functionality with proper image upload support - Implement post scheduling with 6-month limit validation - Add endpoints for post creation, scheduled post management - Only modify the three required files: 1. src/controllers/redditPostControllers.js 2. src/routes/redditPostRouter.js 3. src/startup/routes.js
Member
|
New PR Set: OneCommunityGlobal/HighestGoodNetworkApp#4478 and #1928 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Implements Reddit Auto Poster feature backend support. This update introduces API routes and logic for creating Reddit text and image posts, along with post scheduling functionality. The PR includes image upload workflow integration with Reddit’s API, in-memory scheduling using
node-schedule, and basic scheduled post management. This functionality is part of the broader effort to enable automated social media posting.Implements # (WBS)
Related PRs (if any):
This backend PR is related to the frontend PR #3883 (Reddit Auto Poster UI).
To test this backend PR you need to checkout the frontend PR #3883.
Main changes explained:
redditPostRouter.jsto define routes for Reddit posting under/api/redditredditPostControllers.jsfor handling Reddit post creation logic, including support for text and media postsroutes.jsto mount the new Reddit routerHow to test:
npm installnpm run devto start the server locallyPOST /api/reddit/postwith a valid JWT and form-data includingtitle,subreddit, optionaltext, optionalscheduleTime, and optional image fileGET /api/reddit/scheduledto retrieve scheduled jobsDELETE /api/reddit/scheduled/:jobIdto cancel a specific scheduled jobScreenshots or videos of changes:
N/A (API only)
Note: