コード例 #1
0
def api_get_all_answers():
    """Get all answers"""
    return Validator.check_for_content(Answer.read_all_answers(db.cur), 'There are no Answers')
コード例 #2
0
def api_get_answers(question_id):
    """Get all answers to a specific question"""
    return Validator.check_for_content(Answer.read_all(db.cur, question_id), 'There are no Answers for this question')
コード例 #3
0
def api_get_all_questions():
    """Get all questions"""
    return Validator.check_for_content(Question.read_all(db.cur), 'There are no Questions in store')