Restrict users to only see their own itineraries in the my-itineraries tab. The home tab still has the preset itineraries
Alter existing APIs: GET - /itineraries and POST - /itineraries to include the userId in the request so as to map the user to an itinerary
Include all of the user data except the password in the JWT so the frontend can access the username details (potentially useful for profile page in the coming changes, too)
Change the userModel to no longer include itineraries. Change the itineraryModel to include a userId mapping
Note: it might be a good idea to wipe the DB users (and potentially itineraries) now due to incompatability with new models.
Notes
This results in the following changes,
GET - /itineraries
andPOST - /itineraries
to include theuserId
in the request so as to map the user to an itineraryuserModel
to no longer include itineraries. Change theitineraryModel
to include auserId
mappingNote: it might be a good idea to wipe the DB users (and potentially itineraries) now due to incompatability with new models.
UI Images