Ejemplo 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 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 get_category_by_id(category_id):
    categoryService = service.categories.categories(conn)
    return util.rest_format(categoryService.get_category_by_id(category_id))
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']))
def get_items_by_category(category_id):
    itemService = service.items.items(conn)
    return util.rest_format(itemService.get_items_by_category(category_id))
def get_item_by_id(item_id):
    itemService = service.items.items(conn)
    return util.rest_format(itemService.get_item_by_id(item_id))
Ejemplo 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']))
Ejemplo n.º 9
0
def get_items_by_category(category_id):
    itemService = service.items.items(conn)
    return util.rest_format(itemService.get_items_by_category(category_id))
Ejemplo n.º 10
0
def get_item_by_id(item_id):
    itemService = service.items.items(conn)
    return util.rest_format(itemService.get_item_by_id(item_id))