def remove_task(task_id): task = data.get_task(task_id) if task: tasks.delete_task(task) return '', 202
def get_task(task_id): task = data.get_task(task_id) return jsonify(task.to_primitive(role='DTO')) if task else abort(404)