Exemplo n.º 1
0
def get_all_surveys():
    """
    Get all surveys for all users.
    """
    survey = Survey()
    try:
        return jsonify(surveys=[ob.serialize() for ob in survey.getAll()])
    except ValueError as error:
        raise MethodNotAllowed(error.message)
    except BadValueException as error:
        raise MethodNotAllowed(error.message)
    finally:
        add_to_audit_log('get_all_surveys')