Exemplo n.º 1
0
def getAppData(key):
    logger.info("Hitting URL %s", request.url)

    error, response = None, None
    response = AppDataCore.getAppDataForKey(key)

    if response == None:
        error = "Invalid data requested"

    logger.debug("Error: %s", error)
    logger.debug("Response: %s", response)
    return jsonify(response=response, error=error)
Exemplo n.º 2
0
def getProfileInfo(profileName):
    logger.info("Hitting URL %s", request.url)

    error, response = None, None
    appData = AppDataCore.getAppData()
    response = appData["profile"].get(profileName, None)

    if response == None:
        error = "Profile %s does not exist." % (profileName)

    logger.debug("Error: %s", error)
    logger.debug("Response: %s", response)
    return jsonify(response=response, error=error)