class func updateRetailers(userID:String) {
let whereClause = "objectId='\(userID)'"
let dataQuery = BackendlessDataQuery()
dataQuery.whereClause = whereClause
backendless.persistenceService.of(BackendlessUser.ofClass()).find(dataQuery, response: { (collection) in
let currentPage = collection.getCurrentPage()
let user = currentPage[0] as! BackendlessUser
var newRetailers = [RetailerPage]()
var newRetailer = RetailerPage()
newRetailer.retailerName = "THIS IS GOOD"
newRetailers.append(newRetailer)
let retailers = user.getProperty("followedRetailers") as! [RetailerPage]
for retaila in retailers {
newRetailers.append(retaila)
}
user.setProperty("followedRetailers", object: newRetailers)
backendless.userService.update(user)
}) { (fault) in
print("NO FAULTS")
}
}