Skip to content

fix: resolve trending sort crash in questions API#33

Open
Akshat-Neeraj wants to merge 1 commit into
Ashmita1206:mainfrom
Akshat-Neeraj:fix-trending-sort-crash
Open

fix: resolve trending sort crash in questions API#33
Akshat-Neeraj wants to merge 1 commit into
Ashmita1206:mainfrom
Akshat-Neeraj:fix-trending-sort-crash

Conversation

@Akshat-Neeraj

Copy link
Copy Markdown

Summary

Fixed the trending sort crash in the questions API.

Changes

  • Removed unsupported $expr usage from Mongoose .sort()
  • Replaced invalid trending sort logic with valid field-based sorting
  • Added stable sorting using upvotes and recent creation date

Testing

  • Verified homepage loads without 500 errors
  • Tested trending sort successfully
  • Confirmed questions render correctly

Fixes #23

@vercel

vercel Bot commented May 26, 2026

Copy link
Copy Markdown

@Akshat-Neeraj is attempting to deploy a commit to the anglenobida003-8112's projects Team on Vercel.

A member of the Team first needs to authorize it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Need of fixing trending sort crash and dark mode UI

1 participant