Skip to content

Conversation

@Vriti62
Copy link
Contributor

@Vriti62 Vriti62 commented Aug 23, 2025

Closes: #1197
Linked to parent issue : #1180

Project Published URL 🔗

Backend-only change. Tested locally using Postman. Example API:

Describe the add-ons or changes you've made 📃

  • Added a dedicated POST endpoint to allow users to manually create a new collection for saved projects.
  • Ensured authentication middleware protects this route (only logged-in users can create collections).
  • Implemented validation to prevent duplicate collection names for the same user.
  • Note: Auto-creation of a default collection when saving projects is already covered in Backend: Save a New Project to an Existing Collection (or Auto create the collection) #1194.

Screenshots 📷

image fig1: manually adding collections image fig2: error on creating the same named collection

Type of change ☑️

What sort of change have you made:

  • [☑️ ] New feature
  • [☑️ ] Database update

Note to reviewers 📄

@vercel
Copy link

vercel bot commented Aug 23, 2025

@Vriti62 is attempting to deploy a commit to the avdheshvarshney's projects Team on Vercel.

A member of the Team first needs to authorize it.

@netlify
Copy link

netlify bot commented Aug 23, 2025

Deploy Preview for code-a2z canceled.

Name Link
🔨 Latest commit 71c4043
🔍 Latest deploy log https://app.netlify.com/projects/code-a2z/deploys/68acb667646ad00008f8240c

@github-actions
Copy link

Thank you for submitting your pull request! We'll review it as soon as possible. For further communication, join our discord server https://discord.gg/tSqtvHUJzE.

Copy link
Member

@Avdhesh-Varshney Avdhesh-Varshney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think both of the PRs having same code. OK, perfect to see the working /create-collection api 👍

In next PRs, are you targetting for get request of all projects & collections?

@Vriti62
Copy link
Contributor Author

Vriti62 commented Aug 24, 2025

I think both of the PRs having same code. OK, perfect to see the working /create-collection api 👍

In next PRs, are you targetting for get request of all projects & collections?

Actually both these PRs are raised around the same time, with similar code cause they are linked. This PR has some fixes for the concerned endpoint, createNewCollection

My next PR is including:
-an endpoint to remove the saved Projects from a collection, and
-fetch the saved projects inside the collection, implementing sorting ---
-By date added (newest → oldest, oldest → newest)
-By popularity (most liked → least liked)

I'm hoping this PR is up to the mark and no changes are required!!
Always open for feedback !!

@Vriti62
Copy link
Contributor Author

Vriti62 commented Aug 25, 2025

hey!
is this pr correct and ready to be merged now? pls let me know if theres any other feedback

@Avdhesh-Varshney
Copy link
Member

Avdhesh-Varshney commented Aug 25, 2025

hey! is this pr correct and ready to be merged now? pls let me know if theres any other feedback

Do all unresolved changes of #1207 PR here!

Also go through Discord

@Vriti62
Copy link
Contributor Author

Vriti62 commented Aug 25, 2025

hey! is this pr correct and ready to be merged now? pls let me know if theres any other feedback

Do all unresolved changes of #1207 PR here!

Also go through Discord

hey, the changes for #1207 is of a different PR, and ive raised a seperate PR for it just now : #1213

Copy link
Member

@Avdhesh-Varshney Avdhesh-Varshney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good. Approved 🎉

@Avdhesh-Varshney Avdhesh-Varshney merged commit 0ecfcf3 into Code-A2Z:main Aug 25, 2025
4 of 5 checks passed
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: Create Collection Endpoint (User Option + Auto-Creation)

2 participants