cpsc455-bugstorm / TravelersTea

A Trip Planning App that tailors travel itineraries based on user preferences and providing detailed information about destinations; making travel planning less daunting and more enjoyable.
https://travelerstea-906d.onrender.com
MIT License
6 stars 2 forks source link

Share Itenerary #216

Closed L0Lmaker closed 8 months ago

NLmeng commented 9 months ago

maybe update the root readme as well?

vee-16 commented 9 months ago

im unable to sign in or register, unsure if it's related to your changes, taking a look.

NLmeng commented 9 months ago

also, would like to point out that, if a user copied the shared link, then if any updates are made to that trip, the shared link will no longer work.

L0Lmaker commented 9 months ago

also, would like to point out that, if a user copied the shared link, then if any updates are made to that trip, the shared link will no longer work.

do we regenerate tripIds when the user changes the trip in any way?

NLmeng commented 9 months ago

also, would like to point out that, if a user copied the shared link, then if any updates are made to that trip, the shared link will no longer work.

do we regenerate tripIds when the user changes the trip in any way?

it is because in generateAndSaveTrip when updating, there is a last step that would update the trip with tripToSave.isPublic = false.

this code in particular, (check the content of tripToSave):


savedTrip = await TripModel.findByIdAndUpdate(savedTrip._id, tripToSave, {
        new: true,
        session,
      })
L0Lmaker commented 9 months ago

also, would like to point out that, if a user copied the shared link, then if any updates are made to that trip, the shared link will no longer work.

do we regenerate tripIds when the user changes the trip in any way?

it is because in generateAndSaveTrip when updating, there is a last step that would update the trip with tripToSave.isPublic = false.

this code in particular, (check the content of tripToSave):

savedTrip = await TripModel.findByIdAndUpdate(savedTrip._id, tripToSave, {
        new: true,
        session,
      })

maybe it can be described as a feature 👀 . When users want to disable sharing their trips, all they have to do is change something on the trip 😂

NLmeng commented 9 months ago

also, would like to point out that, if a user copied the shared link, then if any updates are made to that trip, the shared link will no longer work.

do we regenerate tripIds when the user changes the trip in any way?

it is because in generateAndSaveTrip when updating, there is a last step that would update the trip with tripToSave.isPublic = false. this code in particular, (check the content of tripToSave):

savedTrip = await TripModel.findByIdAndUpdate(savedTrip._id, tripToSave, {
        new: true,
        session,
      })

maybe it can be described as a feature 👀 . When users want to disable sharing their trips, all they have to do is change something on the trip 😂

yeah, i am okay with either, just pointing it out

AndyLiang1 commented 9 months ago

Merge main please

L0Lmaker commented 9 months ago

Merge main please

I did d6b5791 There's a new commit that was merged between when i put it up and you reviewed Will merge the new commit 👍

AndyLiang1 commented 8 months ago

User should not be able edit stage image

L0Lmaker commented 8 months ago

Thanks @vee-16 for the edit button update!

L0Lmaker commented 8 months ago

I approve 👍 i will merge EOD, please make any last changes now if you must

AndyLiang1 commented 8 months ago

Please get meng's approval too, since this change a good amount of BE logic