예제 #1
0
파일: app.py 프로젝트: SkyDoge69/TUES-AAP
def save_answer(data):
    print("save_answer")
    user = User.find_by_name(str(data['username']))
    question = Question.find_most_recent_by_user(user.match)
    print(question.content)
    Question.update_answer_by_content(str(data['answer']), question.content)
예제 #2
0
파일: app.py 프로젝트: SkyDoge69/TUES-AAP
def display_question(data):
    print("display")
    user = User.find_by_name(str(data['username']))
    question = Question.find_most_recent_by_user(user.match)
    emit('display', {'question': question.content})