Skip to content
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

Build Backend for Stories Page: Implement CURD operation Routes ✨🚀 #1831

Merged
merged 1 commit into from
Nov 10, 2024

Conversation

Sawan-Kushwah
Copy link
Contributor

issue : #1830

fixes : #1830

Screenshot 2024-11-10 091327

Screenshot 2024-11-10 092308

This PR implements the backend for the Stories page, including the following:
GET /api/posts: Fetches all the stories (posts) from the database.
POST /api/posts: Allows users to create and save new stories by submitting title, content, and category data.
The data is stored in a MongoDB database using Mongoose, and the backend handles both the creation and retrieval of posts.

Changes include:

Creation of routes and controllers for handling posts.
Integration of Mongoose for database interaction.
Validation to ensure necessary fields are provided before saving a new post.

This sets up the backend to support the stories functionality on the frontend.

Pull Request Checklist

  • [ X] I have added screenshots and videos to show before and after the working of my code.
  • [ X] I have ensured that the screen size is set to 100% while making the video.
  • [ X] I have synced the latest fork with my local repository and resolved any conflicts.
  • [ X] I have mentioned the issue number which I created before making this PR .(format to mention issue number is : fixes #(issue number) )
  • [ X] I understand that if any the above conditions are not met , my PR will not be MERGED .

Copy link

vercel bot commented Nov 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
word-wise ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 10, 2024 5:17am

@ANSHIKA-26 ANSHIKA-26 merged commit 236a1bc into ANSHIKA-26:main Nov 10, 2024
5 of 6 checks passed
Copy link

🎉🎉 Thank you for your contribution! Your PR #1831 has been merged! 🎉🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Backend API for stories page !
2 participants