def create_task(user_route): body = request.get_json() new_task = Tasks(user_name=user_route, task_text=body["task_text"], task_done=body["task_done"]) new_task.add_task() return jsonify(new_task.serialize())
def add_task(task, category): Tasks.add_task(task, category)