Ejemplo n.º 1
0
def get_task(task_id):
    # get the task
    task = db_interaction.get_task(int(task_id))

    # return 404 not found if no task has the given id
    if task is None:
        abort(404)
        # convert the task in a JSON representation
    return jsonify({'task': prepare_for_json(task)})
Ejemplo n.º 2
0
def get_task(task_id):
    # get the task
    task = db_interaction.get_task(int(task_id))

    # return 404 not found if no task has the given id
    if task is None:
        abort(404)
        # convert the task in a JSON representation
    return jsonify({'task': prepare_for_json(task)})
Ejemplo n.º 3
0
def get_task(task_id):
    result = db_interaction.get_task(int(task_id))
    if result is not None:
        return jsonify(prepare_json(result))
    else:
        return "CIAO NON ESISTE"