def handleUpdate(msg): table = msg['table'] data = json.loads(msg['data']) installation = msg['installation'] if table == 'tags': if data['name']: return tagHandler.update(data) print("ERROR: Could not update table: %s" % (table)) else: print("ERROR: Unsupported table: %s" % (table)) return False
def put(tag): res = tagHandler.update(tag) if res: return OkResponse("Successfully updated the given tag") else: return ConflictResponse("Could not update the tag for that controller/installation/customer")