update
Updates the verification status of a facility.
If verified is true, the facility will be marked as verified. If false, the facility will be marked as blacklisted. If the facility does not exist locally, it will be added automatically.
Return
true if the facility was updated successfully; false otherwise.
Parameters
facility Id
The unique identifier of the facility to update.
verified
Whether the facility should be marked as verified (true) or blacklisted (false).
Throws
if the update fails.
Android (Kotlin)
lifecycleScope.launch {
val ok = AFCore.facilities().update(facilityId = 12345, verified = true)
if (ok) refreshFacilitiesUI() else showError("Update failed")
}Content copied to clipboard
iOS (Swift)
Task {
do {
let ok = try await AFCore.shared.facilities().update(facilityId: 12345, verified: true)
ok ? self.refreshFacilitiesUI() : self.showError("Update failed")
} catch {
self.showError("Update failed: \\(error.localizedDescription)")
}
}Content copied to clipboard