Skip to content

Saikat dash updating property controller.js#121

Open
SaikatDash wants to merge 2 commits into
hitesh-kumar123:mainfrom
SaikatDash:SaikatDash-updating-property-controller.js
Open

Saikat dash updating property controller.js#121
SaikatDash wants to merge 2 commits into
hitesh-kumar123:mainfrom
SaikatDash:SaikatDash-updating-property-controller.js

Conversation

@SaikatDash

Copy link
Copy Markdown

name: "📦 Pull Request"
about: Submit changes for review
title: "PR: Add location-based search support in property controller"
labels: enhancement
assignees: ""

📌 Linked Issue


🛠 Changes Made

  • Added
    • Location-based property search using city/state filters.
    • Geospatial search support using latitude and longitude.
  • Updated
    • propertyController.js to handle location query parameters.
    • Search logic to support MongoDB $near geospatial queries.
  • Improved
    • Flexible search combining text-based and geo-based filters.

🧪 Testing

  • Ran unit tests (npm test)
  • Tested manually:
    • Test case 1:
      Steps: Search properties using city name
      Expected Result: Only properties from the specified city are returned.
    • Test case 2:
      Steps: Click “Use My Location” → allow browser location access
      Expected Result: Nearby properties are returned based on user’s coordinates.

📝 Documentation Updates

  • Added inline comments in propertyController.js
  • Updated README/docs (planned in separate PR)

✅ Checklist

  • Created a new branch for PR
  • Have starred the repository
  • Follows JavaScript Styleguide
  • No console warnings/errors
  • Commit messages follow Git Guidelines

💡 Additional Notes

  • This PR focuses only on backend controller logic.
  • Frontend UI and service integration are handled in separate commits.
  • MongoDB 2dsphere index is required for optimal performance.

Added a searchProperties function to filter properties by city, state, and geographical location.
@netlify

netlify Bot commented Jan 14, 2026

Copy link
Copy Markdown

Deploy Preview for smartrentsystem canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit d500dbe
🔍 Latest deploy log https://app.netlify.com/projects/smartrentsystem/deploys/696749a2a2af6200070c934c

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.

Feat: [Brief Description] In Search Bar adding my location first as per my profile would be great for searching in my area

2 participants