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)})
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)})
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"