Exemplo n.º 1
0
def update_item(item_id):
    itemService = service.items.items(conn)
    return util.rest_format(
        itemService.update_item(item_id, request.json['code'],
                                request.json['name'], request.json['price'],
                                request.json['categories'],
                                security.getUserId()))
def delete_category(category_id):
    categoryService = service.categories.categories(conn)
    categoryService.delete_category(category_id, security.getUserId())
    return ""
def update_category(category_id):
    categoryService = service.categories.categories(conn)
    return util.rest_format(
        categoryService.update_category(category_id, request.json['code'],
                                        request.json['name'],
                                        security.getUserId()))
def delete_item(item_id):
    itemService = service.items.items(conn)
    itemService.delete_item(item_id, security.getUserId())
    return ""
def update_item(item_id):
    itemService = service.items.items(conn)
    return util.rest_format(itemService.update_item(item_id, request.json['code'], request.json['name'], request.json['price'], request.json['categories'], security.getUserId()))
def create_item():
    itemService = service.items.items(conn)
    return util.rest_format(itemService.create_item(request.json['code'], request.json['name'], request.json['price'], security.getUserId(), request.json['categories']))
Exemplo n.º 7
0
def delete_item(item_id):
    itemService = service.items.items(conn)
    itemService.delete_item(item_id, security.getUserId())
    return ""
Exemplo n.º 8
0
def create_item():
    itemService = service.items.items(conn)
    return util.rest_format(
        itemService.create_item(request.json['code'], request.json['name'],
                                request.json['price'], security.getUserId(),
                                request.json['categories']))