Skip to content

Commit 00b10c4

Browse files
committed
refactor(app): ENDPOINT -> API_URL
1 parent 8e5f241 commit 00b10c4

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// metro-now
22
// https://github.com/krystxf/metro-now
33

4-
let ENDPOINT: String = "https://api.metronow.dev"
4+
let API_URL: String = "https://api.metronow.dev"

apps/mobile/metro-now/metro-now Watch App/pages/closest-stop-list/closest-stop-list-view-model.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class ClosestStopListViewModel: NSObject, ObservableObject, CLLocationManagerDel
7777

7878
private func getStops() {
7979
let request = AF.request(
80-
"\(ENDPOINT)/v1/stop/all",
80+
"\(API_URL)/v1/stop/all",
8181
method: .get,
8282
parameters: ["metroOnly": String(true)]
8383
)
@@ -104,7 +104,7 @@ class ClosestStopListViewModel: NSObject, ObservableObject, CLLocationManagerDel
104104
decoder.dateDecodingStrategy = .iso8601
105105

106106
let request = AF.request(
107-
"\(ENDPOINT)/v2/departure",
107+
"\(API_URL)/v2/departure",
108108
method: .get,
109109
parameters: [
110110
"stop": stopsIds,

apps/mobile/metro-now/metro-now/pages/closest-stop/closest-stop-page-view-model.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class ClosestStopPageViewModel: NSObject, ObservableObject, CLLocationManagerDel
107107

108108
private func getStops(metroOnly: Bool = false) {
109109
let request = AF.request(
110-
"\(ENDPOINT)/v1/stop/all",
110+
"\(API_URL)/v1/stop/all",
111111
method: .get,
112112
parameters: ["metroOnly": String(metroOnly)]
113113
)
@@ -146,7 +146,7 @@ class ClosestStopPageViewModel: NSObject, ObservableObject, CLLocationManagerDel
146146
decoder.dateDecodingStrategy = .iso8601
147147

148148
let request = AF.request(
149-
"\(ENDPOINT)/v2/departure",
149+
"\(API_URL)/v2/departure",
150150
method: .get,
151151
parameters: [
152152
"stop": stopsIds,

0 commit comments

Comments
 (0)