From 587fe5d995b3e1893670a9a99cfc355495b3912a Mon Sep 17 00:00:00 2001 From: Laurent Date: Tue, 1 Apr 2025 19:07:15 +0200 Subject: [PATCH] patches tournament and upload values to server --- PadelClub/Utils/Patcher.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/PadelClub/Utils/Patcher.swift b/PadelClub/Utils/Patcher.swift index 94e4447..48ca002 100644 --- a/PadelClub/Utils/Patcher.swift +++ b/PadelClub/Utils/Patcher.swift @@ -53,6 +53,7 @@ enum PatchError: Error { enum Patch: String, CaseIterable { case cleanLogs case syncUpgrade + case updateTournaments var id: String { return "padelclub.app.patch.\(self.rawValue)" @@ -83,6 +84,7 @@ class AutomaticPatcher { switch patch { case .cleanLogs: self._cleanLogs() case .syncUpgrade: self._syncUpgrade() + case .updateTournaments: self._updateTournaments() } } @@ -128,4 +130,7 @@ class AutomaticPatcher { } } + fileprivate static func _updateTournaments() { + DataStore.shared.tournaments.addOrUpdate(contentOfs: DataStore.shared.tournaments) + } }