Skip to content

Commit

Permalink
improved flow
Browse files Browse the repository at this point in the history
  • Loading branch information
steveww committed Feb 14, 2018
1 parent 547b063 commit 0ae34bc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
3 changes: 0 additions & 3 deletions load-gen/robot-shop.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ def load(self):
order = self.client.post('/api/payment/pay/{}'.format(uniqueid), json=cart).json()
print('Order {}'.format(order))

# delete cart
self.client.delete('/api/cart/cart/{}'.format(uniqueid))


class WebsiteUser(HttpLocust):
task_set = UserBehavior
Expand Down
4 changes: 3 additions & 1 deletion payment/payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ def pay(id):
headers={'Content-Type': 'application/json'})
app.logger.info('order history returned {}'.format(req.status_code))

# TDOD - order history
# delete cart
req = requests.delete('http://cart:8080/cart/' + id);
app.logger.info('cart delete returned {}'.format(req.status_code))

return jsonify({ 'orderid': orderid })

Expand Down
8 changes: 0 additions & 8 deletions web/static/js/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,14 +406,6 @@
};
currentUser.cart = $scope.data.cart;
$scope.data.cont = true;
$http({
url: '/api/cart/cart/' + $scope.data.uniqueid,
method: 'DELETE'
}).then((res) => {
console.log('cart deleted ok');
}).catch((e) => {
console.log('ERROR cart delete', e);
});
}).catch((e) => {
console.log('ERROR', e);
$scope.data.message = 'ERROR placing order';
Expand Down

0 comments on commit 0ae34bc

Please sign in to comment.