improved flow

This commit is contained in:
Steve Waterworth
2018-02-14 09:29:47 +00:00
parent 547b0637df
commit 0ae34bcfbb
3 changed files with 3 additions and 12 deletions

View File

@@ -54,9 +54,6 @@ class UserBehavior(TaskSet):
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

View File

@@ -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 })

View File

@@ -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';