def newClient(): if not request.json or not 'email' in request.json or not 'pass' in request.json: abort(400) email = request.json['email'] password = request.json['pass'] client = Clients(email=email, password=password, carts=[], address=request.json.get('address', ), phone=request.json.get('phone', ), id=email) client.put() memcache.flush_all() return make_response(jsonify({'created': client.key.id()}), 201)
def newClient(): if not request.json or not 'email' in request.json or not 'pass' in request.json: abort(400) email = request.json['email'] password = request.json['pass'] client = Clients( email = email, password = password, carts = [], address = request.json.get('address', ), phone = request.json.get('phone', ), id = email) client.put() memcache.flush_all() return make_response(jsonify({'created':client.key.id()}), 201)
def newClient(): if not request.json or not "email" in request.json or not "pass" in request.json: abort(400) email = request.json["email"] password = request.json["pass"] client = Clients( email=email, password=password, carts=[], address=request.json.get("address"), phone=request.json.get("phone"), id=email, ) client.put() memcache.flush_all() return make_response(jsonify({"created": client.key.id()}), 201)
def getClients(): return make_response(jsonify({'clients': Clients.getName()}), 200)
def deleteClients(): for client in Clients.query(): client.key.delete() return make_response('deleted')
def getClients(): return make_response(jsonify({'clients':Clients.getName()}), 200)