-
Notifications
You must be signed in to change notification settings - Fork 213
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
[FEAT]: Schedule blog post feature #1234
Open
KehindeBello
wants to merge
19
commits into
hngprojects:dev
Choose a base branch
from
KehindeBello:feat/schedule-blog-post
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[FEAT]: Schedule blog post feature #1234
KehindeBello
wants to merge
19
commits into
hngprojects:dev
from
KehindeBello:feat/schedule-blog-post
Conversation
This file contains 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
- added endpoint for a user to retrieve their schedules blogs - modified create_blog endpoint access to user and not only super_admin
- added endpoint for a user to retrieve their schedules blogs - modified create_blog endpoint access to user and not only super_admin
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
This update enhances the blog post creation functionality by enabling users to schedule blog posts for future publication. The following changes have been made:
scheduled_at
in payload for blog creation endpointscheduled_at
andstatus
fields (published or pending).background job
to check and publish scheduled posts at the correct time.GET /api/v1/blogs
endpoint to return only published posts, excluding scheduled ones.New Endpoint
Request Sample
Request Type: GET
Request URL:
/api/v1/blogs/scheduled
Headers:
Response [Success]
Related Issue (Link to issue ticket)
Link to Issue
Motivation and Context
By providing a feature that automatically publishes posts at a specified time, users can plan content ahead of time and ensure consistent publishing, even when they are unavailable.
I have tested that fetching blogs only returns published blogs and that blog becomes publishe at scheduled time
Screenshots (if appropriate - Postman, etc):
Create a scheduled blog

Create a blog - instant publishing

Fetch scheduled blogs

Types of changes
Checklist: