Skip to content

Commit

Permalink
Updating address now changes foodListing address and approxAddress as…
Browse files Browse the repository at this point in the history
… well
  • Loading branch information
Sadliquid committed Aug 1, 2024
1 parent 4dbd9b1 commit 22db344
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion routes/identity/myAccount.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,9 @@ router.put('/changeAddress', validateToken, async (req, res) => {
const coordinates = { lat: geoLocation.lat, lng: geoLocation.lng };
const updatedListings = await FoodListing.update(
{
coordinates: `${coordinates.lat},${coordinates.lng}`
coordinates: `${coordinates.lat},${coordinates.lng}`,
address: address,
approxAddress: `${street} ${postalCode}`
},
{
where: { hostID: user.userID }
Expand Down

0 comments on commit 22db344

Please sign in to comment.