evgenii-shvetsov / home

1 stars 1 forks source link

Design Docs Checklist #1

Open taylormusolf opened 1 year ago

taylormusolf commented 1 year ago

Wiki Home Page

evgenii-shvetsov commented 1 year ago
  1. Feature List.

    • I decided to leave the "DELETE" option for the listing's owner, and In the "UPDATE" request, I'll add a toggle to ACTIVE/ARCHIVE a listing
  2. DATABASE SCHEMA - fixed

  3. SAMPLE STATE - fixed

  4. BACKEND ROUTES

    • Getting "favorites", you are right. Logged In user, will be able to get access to a page with their "favorite" listings. Is something wrong with this route "GET /api/users/:id/favorites"
    • how are you getting back listings for sale vs for rent?. My plan was to use this route "GET /api/listings" on the backend and then, on the React side, filter the data with SALE or RENT status. Is it possible to do this?
taylormusolf commented 1 year ago

If you were planning on getting the user's favorites at the same time as getting other user info then it could be considered a superfluous route. But I do see that you have "user profile" as different from the "user favorite" pages so I think that can justify keeping a dedicated GET route for favorites.

It is possible to get all of them and then filter them on the front end, but it is technically inefficient. It would be better to have the backend take care of the filtering.