Skip to content

Commit ca2e772

Browse files
committed
Enable REST API on the country fetch endpoint
1 parent f4d657e commit ca2e772

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Networking/Networking/Remote/DataRemote.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ public final class DataRemote: Remote {
88
/// - siteID: Remote ID of the site that owns the countries.
99
/// - completion: Closure to be executed upon completion.
1010
public func loadCountries(siteID: Int64, completion: @escaping (Result<[Country], Error>) -> Void) {
11-
let request = JetpackRequest(wooApiVersion: .mark3, method: .get, siteID: siteID, path: Path.countries)
11+
let request = JetpackRequest(wooApiVersion: .mark3,
12+
method: .get,
13+
siteID: siteID,
14+
path: Path.countries,
15+
availableAsRESTRequest: true)
1216
let mapper = CountryListMapper()
1317
enqueue(request, mapper: mapper, completion: completion)
1418
}

0 commit comments

Comments
 (0)