def create_new_customer():
"""Creates a new customer from the given data
@data The attributes to be present in the customer item"""
data = jsonpickle.decode(request.data.decode("utf-8"))
customer = Customer.create_new(attributes=data)
customer.create()
return jsonpickle.encode(dict(
success=True
))
评论列表
文章目录