Api URL change

multistore
Laurent 1 year ago
parent e936cd7555
commit e5e01ba5b1
  1. 13
      PadelClub/Data/DataStore.swift
  2. 2
      PadelClubTests/ServerDataTests.swift
  3. 2
      PadelClubTests/TokenExemptionTests.swift
  4. 2
      PadelClubTests/UserDataTests.swift

@ -58,7 +58,9 @@ class DataStore: ObservableObject {
init() {
let store = Store.main
store.synchronizationApiURL = "https://xlr.alwaysdata.net/api/"
store.synchronizationApiURL = "https://xlr.alwaysdata.net/roads/"
store.logsFailedAPICalls()
var synchronized : Bool = true
_ = Guard.main // init
@ -206,16 +208,9 @@ class DataStore: ObservableObject {
for groupStage in tournament.groupStages() {
_ = try await service.post(groupStage)
// for match in groupStage._matches() {
// try await self._insertMatch(match: match, service: service)
// }
}
for round in tournament.rounds() {
try await self._insertRoundAndChildren(round: round, service: service)
// _ = try await service.post(round)
// for match in round._matches() {
// try await self._insertMatch(match: match, service: service)
// }
}
for teamRegistration in tournament.unsortedTeams() {
_ = try await service.post(teamRegistration)
@ -224,13 +219,11 @@ class DataStore: ObservableObject {
}
}
for groupStage in tournament.groupStages() {
// _ = try await service.post(groupStage)
for match in groupStage._matches() {
try await self._insertMatch(match: match, service: service)
}
}
for round in tournament.allRounds() {
// _ = try await service.post(round)
for match in round._matches() {
try await self._insertMatch(match: match, service: service)
}

@ -15,7 +15,7 @@ final class ServerDataTests: XCTestCase {
let password: String = "MyPass1234--"
override func setUpWithError() throws {
Store.main.synchronizationApiURL = "http://127.0.0.1:8000/api/"
Store.main.synchronizationApiURL = "http://127.0.0.1:8000/roads/"
Task {
do {
try await self.login()

@ -16,7 +16,7 @@ final class TokenExemptionTests: XCTestCase {
let password: String = "MyPass1234--"
override func setUpWithError() throws {
Store.main.synchronizationApiURL = "http://127.0.0.1:8000/api/"
Store.main.synchronizationApiURL = "http://127.0.0.1:8000/roads/"
Store.main.disconnect()
}

@ -15,7 +15,7 @@ final class UserDataTests: XCTestCase {
let password: String = "MyPass1234--"
override func setUpWithError() throws {
Store.main.synchronizationApiURL = "http://127.0.0.1:8000/api/"
Store.main.synchronizationApiURL = "http://127.0.0.1:8000/roads/"
}
override func tearDownWithError() throws {

Loading…
Cancel
Save