Skip to content

Commit

Permalink
fix(forward_driver_trip): parse body as expected
Browse files Browse the repository at this point in the history
  • Loading branch information
Franco Méndez committed Oct 26, 2019
1 parent ed08ed1 commit 2c590f6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions forward_driver_trip.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,16 @@ exports.handler = async (event) => {
const userId = await bearerToUserId.bearerToUserId(event.headers.Authorization.substring(7));
const tripId = event.pathParameters.trip;

const result = await forwardTrip(tripId, userId);
await forwardTrip(tripId, userId);
const responseBody = {
action: 'forward',
success: true,
resource: 'trip',
resource_id: tripId
};
return {
statusCode: 200,
headers: { 'Access-Control-Allow-Origin': '*' },
body: JSON.stringify(result)
body: JSON.stringify(responseBody)
};
};

0 comments on commit 2c590f6

Please sign in to comment.