Skip to content

Commit

Permalink
Merge pull request #81 from josephlee222/locations
Browse files Browse the repository at this point in the history
Greenmiles points
  • Loading branch information
josephlee222 authored Aug 14, 2023
2 parents ae00887 + ada9d04 commit c29eff3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/tproject/src/pages/rider/ViewSpecificRequest.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,12 @@ const RideRequestDetails = () => {
.then(() => {
// Deduct the finalPrice from the user's cash attribute
const updatedCash = user.cash - finalPrice;
const greenMiles = user.points + (finalPrice / 100).toFixed()

// Update the user's cash attribute
return http.put(`/riderequests/minuscash/user/${rideRequest.userId}`, {
cash: updatedCash,
points: greenMiles
});
})
.then(() => {
Expand Down

1 comment on commit c29eff3

@vercel
Copy link

@vercel vercel bot commented on c29eff3 Aug 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.